Commit cba7d658 authored by Jody Goldberg's avatar Jody Goldberg

Be careful to pass unsigned chars to isdigit.

parent 42d9b498
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
2000-06-29 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_name_quote) : cast to unsigned char for safety
when using isdigit.
* src/workbook.c (wb_edit_key_pressed) : Ditto.
2000-06-28 Arturo Tena <arturo@directmail.org>
* configure.in: Improve libole2 detection.
......
......@@ -2616,7 +2616,7 @@ sheet_name_quote (const char *name_unquoted)
g_return_val_if_fail (name_unquoted != NULL, NULL);
needs_quotes = isdigit (*name_unquoted);
needs_quotes = isdigit ((unsigned char)*name_unquoted);
if (!needs_quotes)
for (i = 0, quotes_embedded = 0; name_unquoted [i]; i++) {
for (j = 0; quote_chr [j]; j++)
......
......@@ -1759,7 +1759,7 @@ wb_edit_key_pressed (GtkEntry *entry, GdkEventKey *event, Workbook *wb)
++end_pos;
if (entry->text[end_pos] == '$')
++end_pos;
while (isdigit (entry->text[end_pos]))
while (isdigit ((unsigned char)entry->text[end_pos]))
++end_pos;
/*
......@@ -1767,7 +1767,7 @@ wb_edit_key_pressed (GtkEntry *entry, GdkEventKey *event, Workbook *wb)
* starting from the end we just found
*/
start_pos = end_pos - 1;
while (start_pos >= 0 && isdigit (entry->text[start_pos]))
while (start_pos >= 0 && isdigit ((unsigned char)entry->text[start_pos]))
--start_pos;
if (start_pos == end_pos)
return TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment