From 6eb5f593f09a86fda02559f24c0ea1c54640bfdf Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 12 Jan 2010 09:49:55 -0800 Subject: [PATCH] realloc() to the correct string. Someone had mistyped the destination of the realloc. It should have been the original string not the input buffer. --- vpi/sys_scanf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vpi/sys_scanf.c b/vpi/sys_scanf.c index f87780140..d17fec3a9 100644 --- a/vpi/sys_scanf.c +++ b/vpi/sys_scanf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 2006-2010 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -121,7 +121,7 @@ static double float_string(struct byte_source*src) } while (isdigit(ch)) { - src = realloc(str, len+2); + str = realloc(str, len+2); str[len++] = ch; ch = byte_getc(src); }