X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCval.c;h=c197f817a803e9a5bcfd6e5bdfb3a307196e2a0e;hb=504d65007777af4f9c2854c70f2e99e91b344ae9;hp=329f51c7fd8424f30892113e95908eb0688f1637;hpb=ed1f876ebb23b623bcf60329dfe3f4682e7ca184;p=fw%2Fsdcc diff --git a/src/SDCCval.c b/src/SDCCval.c index 329f51c7..c197f817 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -225,7 +225,7 @@ valueFromLit (double lit) return constVal (buffer); } - sprintf (buffer, "%lf", lit); + sprintf (buffer, "%f", lit); return constFloatVal (buffer); } @@ -326,9 +326,9 @@ constVal (char *s) SPEC_CVAL (val->type).v_int = sval; } - // check the size and make it a short if required + // check the size and make it a char if possible if (sval < 256) - SPEC_SHORT (val->etype) = 1; + SPEC_NOUN (val->etype) = V_CHAR; return val; @@ -392,7 +392,7 @@ char octalEscape (char **str) { } /*! - /fn void copyStr (char *dest, char *src) + /fn int copyStr (char *dest, char *src) Copies a source string to a dest buffer interpreting escape sequences and special characters