diff --git a/eval.c b/eval.c index cf313b4..112c230 100644 --- a/eval.c +++ b/eval.c @@ -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); diff --git a/line.c b/line.c index c4ec6d6..9c4afb7 100644 --- a/line.c +++ b/line.c @@ -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) {