klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 90f636b2ad806f852ed73d3caf62127ace771c7e
parent 6d15ebe62a5b25fc7935c618e8b130c216ef730d
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 15 Apr 2011 17:57:54 -0300

Bugfix: wasn't counting the sign in buf_len when reading simple negative integers.

Diffstat:
Msrc/ktoken.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ktoken.c b/src/ktoken.c @@ -451,7 +451,7 @@ TValue ktok_read_maybe_signed_numeric(klisp_State *K) return new_sym; } else { ks_tbadd(K, ch); - int32_t buf_len = ktok_read_until_delimiter(K); + int32_t buf_len = ktok_read_until_delimiter(K)+1; char *buf = ks_tbget_buffer(K); /* no exactness or radix prefix, default radix: 10 */ return ktok_read_number(K, buf, buf_len, false, false, false, 10);