diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.257 2017/07/07 16:34:32 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.258 2017/11/08 14:50:23 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -994,7 +994,7 @@ static int num2straux (char *buff, int sz, lua_Number x) { | |||
994 | lua_Number m = l_mathop(frexp)(x, &e); /* 'x' fraction and exponent */ | 994 | lua_Number m = l_mathop(frexp)(x, &e); /* 'x' fraction and exponent */ |
995 | int n = 0; /* character count */ | 995 | int n = 0; /* character count */ |
996 | if (m < 0) { /* is number negative? */ | 996 | if (m < 0) { /* is number negative? */ |
997 | buff[n++] = '-'; /* add signal */ | 997 | buff[n++] = '-'; /* add sign */ |
998 | m = -m; /* make it positive */ | 998 | m = -m; /* make it positive */ |
999 | } | 999 | } |
1000 | buff[n++] = '0'; buff[n++] = 'x'; /* add "0x" */ | 1000 | buff[n++] = '0'; buff[n++] = 'x'; /* add "0x" */ |