Fix abs() being used for long int in l_precomp.c

This commit is contained in:
Zack Middleton 2015-06-28 18:13:06 -05:00
parent 70eb1fa79e
commit 1d09a7d578

View file

@ -2445,7 +2445,7 @@ int PC_Directive_eval(source_t *source)
token.whitespace_p = source->scriptstack->script_p;
token.endwhitespace_p = source->scriptstack->script_p;
token.linescrossed = 0;
sprintf(token.string, "%d", abs(value));
sprintf(token.string, "%ld", labs(value));
token.type = TT_NUMBER;
token.subtype = TT_INTEGER|TT_LONG|TT_DECIMAL;
PC_UnreadSourceToken(source, &token);
@ -2550,12 +2550,12 @@ int PC_DollarDirective_evalint(source_t *source)
token.whitespace_p = source->scriptstack->script_p;
token.endwhitespace_p = source->scriptstack->script_p;
token.linescrossed = 0;
sprintf(token.string, "%d", abs(value));
sprintf(token.string, "%ld", labs(value));
token.type = TT_NUMBER;
token.subtype = TT_INTEGER|TT_LONG|TT_DECIMAL;
#ifdef NUMBERVALUE
token.intvalue = abs(value);
token.intvalue = labs(value);
token.floatvalue = token.intvalue;
#endif //NUMBERVALUE