bitsy/keyboard: do not rely on atoi() being able to parse hex
This commit is contained in:
parent
d7f4ef7bbc
commit
4b787e3205
2 changed files with 2 additions and 2 deletions
|
@ -363,7 +363,7 @@ threadmain(int argc, char *argv[])
|
|||
if(n == 3)
|
||||
if(strcmp(args[0], "keyboard:")==0 || strcmp(args[0], "scribble:")==0)
|
||||
if(strcmp(args[1], "value") == 0){
|
||||
n = atoi(args[2]);
|
||||
n = strtol(args[2], 0, 0);
|
||||
if(n <= Runemax){
|
||||
r = n;
|
||||
i = runetochar(str, &r);
|
||||
|
|
|
@ -279,7 +279,7 @@ threadmain(int argc, char *argv[])
|
|||
if(n == 3)
|
||||
if(strcmp(args[0], "keyboard:")==0 || strcmp(args[0], "scribble:")==0)
|
||||
if(strcmp(args[1], "value") == 0){
|
||||
n = atoi(args[2]);
|
||||
n = strtol(args[2], 0, 0);
|
||||
if(n == '\033') /* Escape exits */
|
||||
break;
|
||||
if(n <= Runemax){
|
||||
|
|
Loading…
Reference in a new issue