mirror of https://github.com/rusefi/lua.git
arguments for "format" 'x', 'X', 'o' and 'u' must be unsigned int.
This commit is contained in:
parent
9890bedaab
commit
da252eeff7
4
bugs
4
bugs
|
@ -37,3 +37,7 @@ Wed Jan 28 14:48:12 EDT 1998
|
|||
Mon Mar 9 15:26:09 EST 1998
|
||||
>> gsub('a', '(b?)%1*' ...) loops (because the capture is empty).
|
||||
|
||||
** lstrlib.c
|
||||
Mon May 18 19:20:00 EST 1998
|
||||
>> arguments for "format" 'x', 'X', 'o' and 'u' must be unsigned int.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lstrlib.c,v 1.11 1998/03/09 18:28:08 roberto Exp roberto $
|
||||
** $Id: lstrlib.c,v 1.12 1998/03/24 20:14:25 roberto Exp roberto $
|
||||
** Standard library for strings and pattern-matching
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -494,10 +494,12 @@ static void str_format (void)
|
|||
sprintf(buff, form, s);
|
||||
break;
|
||||
}
|
||||
case 'c': case 'd': case 'i': case 'o':
|
||||
case 'u': case 'x': case 'X':
|
||||
case 'c': case 'd': case 'i':
|
||||
sprintf(buff, form, (int)luaL_check_number(arg));
|
||||
break;
|
||||
case 'o': case 'u': case 'x': case 'X':
|
||||
sprintf(buff, form, (unsigned int)luaL_check_number(arg));
|
||||
break;
|
||||
case 'e': case 'E': case 'f': case 'g': case 'G':
|
||||
sprintf(buff, form, luaL_check_number(arg));
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue