diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-12 18:34:29 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-12 18:34:29 +0900 |
| commit | bf2110d2065ca56aee0b2617cdf38c2d743f70cc (patch) | |
| tree | 62711879013f44e1e84a77fd59972e09108b1418 | |
| parent | 01fdf03bce64a7f091cef040a326c8e5305a512c (diff) | |
| download | mruby-bf2110d2065ca56aee0b2617cdf38c2d743f70cc.tar.gz mruby-bf2110d2065ca56aee0b2617cdf38c2d743f70cc.zip | |
codegen.c: need to preserve `neg` info.
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index c1a0f8afa..ecd157383 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -622,6 +622,7 @@ new_litbn(codegen_scope *s, const char *p, int base, mrb_bool neg) buf = (char*)codegen_realloc(s, NULL, len+3); buf[0] = len; buf[1] = base; + if (neg) buf[1] = 0x80; memcpy(buf+2, p, len); buf[len+2] = '\0'; pv->u.str = buf; |
