diff options
Diffstat (limited to '')
| -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.222 2015/01/13 17:18:25 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.224 2015/02/04 12:54:31 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 | */ |
| @@ -835,7 +835,7 @@ static int num2straux (char *buff, lua_Number x) { | |||
| 835 | return sprintf(buff, LUA_NUMBER_FMT, x); /* equal to '%g' */ | 835 | return sprintf(buff, LUA_NUMBER_FMT, x); /* equal to '%g' */ |
| 836 | else if (x == 0) { /* can be -0... */ | 836 | else if (x == 0) { /* can be -0... */ |
| 837 | sprintf(buff, LUA_NUMBER_FMT, x); | 837 | sprintf(buff, LUA_NUMBER_FMT, x); |
| 838 | strcpy(buff + (buff[0] == '-' ? 1 : 0), "0x0p+0"); | 838 | strcat(buff, "x0p+0"); /* reuses '0/-0' from 'sprintf'... */ |
| 839 | return strlen(buff); | 839 | return strlen(buff); |
| 840 | } | 840 | } |
| 841 | else { | 841 | else { |
