Insure &asc &chr 128 equals 128.

Insert-string can't handle character code > 0xFF.
This commit is contained in:
Renaud 2015-02-02 12:50:52 +08:00
parent 7c74bfdc1a
commit 91455a2e5a
2 changed files with 2 additions and 2 deletions

2
eval.c
View File

@ -516,7 +516,7 @@ static char *gtfun( char *fname) {
retstr = ltos( atoi( argx) == 42) ;
break ;
case UFASCII:
retstr = i_to_a( (int) argx[ 0]) ;
retstr = i_to_a( (int) argx[ 0] & 0xFF) ;
break ;
case UFCHR:
result[0] = atoi(argx);

2
line.c
View File

@ -265,7 +265,7 @@ int linstr( char *instr) {
while( (tmpc = *instr++)) {
status =
(tmpc == '\n' ? lnewline() : linsert( 1, tmpc)) ;
(tmpc == '\n' ? lnewline() : linsert( 1, tmpc & 0xFF)) ;
/* Insertion error? */
if( status != TRUE) {