summaryrefslogtreecommitdiff
path: root/utils/hp2ps/HpFile.c
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2014-08-08 18:01:19 +0200
committerGabor Greif <ggreif@gmail.com>2014-08-08 18:01:19 +0200
commit5f003d228340c3ce8e500f9053f353c58dc1dc94 (patch)
treea855b0f173ff635b48354e1136ef6cbb2a1214a4 /utils/hp2ps/HpFile.c
parentff9c5570395bcacf8963149b3a8475f5644ce694 (diff)
parentdff0623d5ab13222c06b3ff6b32793e05b417970 (diff)
downloadhaskell-wip/generics-propeq.tar.gz
Merge branch 'master' into wip/generics-propeqwip/generics-propeq
Conflicts: compiler/typecheck/TcGenGenerics.lhs
Diffstat (limited to 'utils/hp2ps/HpFile.c')
-rw-r--r--utils/hp2ps/HpFile.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/hp2ps/HpFile.c b/utils/hp2ps/HpFile.c
index 5ee9cc259e..9459247a03 100644
--- a/utils/hp2ps/HpFile.c
+++ b/utils/hp2ps/HpFile.c
@@ -227,7 +227,7 @@ GetHpLine(FILE *infp)
Error("%s, line %d: integer must follow identifier", hpfile,
linenum);
}
- StoreSample(GetEntry(theident), nsamples, (floatish) theinteger);
+ StoreSample(GetEntry(theident), nsamples, thefloatish);
GetHpTok(infp);
break;
@@ -358,8 +358,13 @@ GetNumber(FILE *infp)
thefloatish = (floatish) atof(numberstring);
return FLOAT_TOK;
} else {
- theinteger = atoi(numberstring);
- return INTEGER_TOK;
+ theinteger = atoi(numberstring);
+ /* Set thefloatish too.
+ If this is an identifier line, the value might exceed
+ the size of 'int', and we are going to convert it to
+ a floatish anyways. */
+ thefloatish = (floatish) atof(numberstring);
+ return INTEGER_TOK;
}
}