mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Fix bug #31081 (`lookahead-u8' returns an s8.)
Reported by Göran Weinholt <goran@weinholt.se>. * libguile/r6rs-ports.c (scm_lookahead_u8): Return an unsigned byte. * test-suite/tests/r6rs-ports.test ("7.2.8 Binary Input")["lookahead-u8: result is unsigned"]: New test.
This commit is contained in:
parent
e7bee74771
commit
3fa882203a
3 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -447,7 +447,7 @@ SCM_DEFINE (scm_lookahead_u8, "lookahead-u8", 1, 0, 0,
|
|||
|
||||
result = scm_peek_char (port);
|
||||
if (SCM_CHARP (result))
|
||||
result = SCM_I_MAKINUM ((signed char) SCM_CHAR (result));
|
||||
result = SCM_I_MAKINUM ((unsigned char) SCM_CHAR (result));
|
||||
else
|
||||
result = SCM_EOF_VAL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue