Add support for float negative values to #emit
Signed-off-by: VVWVV <d0u61ev@gmail.com>
This commit is contained in:
parent
6a3ab7c9f4
commit
b75c633ad7
@ -1346,10 +1346,16 @@ static int command(void)
|
||||
extern char *sc_tokens[];/* forward declaration */
|
||||
char s2[33]="-";
|
||||
if ((char)tok=='-') {
|
||||
if (lex(&val,&str)==tNUMBER) {
|
||||
int current_token=lex(&val,&str);
|
||||
if (current_token==tNUMBER) {
|
||||
outval(-val,FALSE);
|
||||
code_idx+=opargs(1);
|
||||
break;
|
||||
} else if (current_token==tRATIONAL) {
|
||||
/* change the first bit to make the number negative */
|
||||
outval(val | 0x80000000,FALSE);
|
||||
code_idx+=opargs(1);
|
||||
break;
|
||||
} else {
|
||||
strcpy(s2+1, str);
|
||||
error(1,sc_tokens[tSYMBOL-tFIRST],s2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user