forked from AuroraMiddleware/gtk
fixed a bug that caused floats of the format ".xxx" to be parsed as "xxx".
Mon Apr 6 18:43:25 1998 Tim Janik <timj@gtk.org> * gscanner.c (g_scanner_get_token_ll): fixed a bug that caused floats of the format ".xxx" to be parsed as "xxx".
This commit is contained in:
parent
0f9fe89727
commit
49efbf9b1d
@ -1,3 +1,8 @@
|
||||
Mon Apr 6 18:43:25 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gscanner.c (g_scanner_get_token_ll): fixed a bug that caused floats
|
||||
of the format ".xxx" to be parsed as "xxx".
|
||||
|
||||
Fri Apr 3 20:36:35 1998 Owen Taylor <owt1@cornell.edu>
|
||||
|
||||
* gutils.c (g_parse_debug_string): Make debug string
|
||||
|
@ -641,6 +641,8 @@ g_scanner_get_token_ll (GScanner *scanner,
|
||||
|
||||
do
|
||||
{
|
||||
register gboolean dotted_float = FALSE;
|
||||
|
||||
ch = g_scanner_get_char (scanner, line_p, position_p);
|
||||
|
||||
value.v_int = 0;
|
||||
@ -796,6 +798,7 @@ g_scanner_get_token_ll (GScanner *scanner,
|
||||
if (!config->scan_float)
|
||||
goto default_case;
|
||||
token = G_TOKEN_FLOAT;
|
||||
dotted_float = TRUE;
|
||||
ch = g_scanner_get_char (scanner, line_p, position_p);
|
||||
goto number_parsing;
|
||||
|
||||
@ -868,7 +871,7 @@ g_scanner_get_token_ll (GScanner *scanner,
|
||||
if (token == G_TOKEN_NONE)
|
||||
token = G_TOKEN_INT;
|
||||
|
||||
gstring = g_string_new ("");
|
||||
gstring = g_string_new (dotted_float ? "0." : "");
|
||||
gstring = g_string_append_c (gstring, ch);
|
||||
in_number = TRUE;
|
||||
while (in_number)
|
||||
|
Loading…
Reference in New Issue
Block a user