gcalctool r2023 - trunk/gcalctool
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gcalctool r2023 - trunk/gcalctool
- Date: Tue, 11 Mar 2008 03:36:45 +0000 (GMT)
Author: rancell
Date: Tue Mar 11 03:36:45 2008
New Revision: 2023
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2023&view=rev
Log:
Return 0 for usable_num when expression is empty
Modified:
trunk/gcalctool/functions.c
Modified: trunk/gcalctool/functions.c
==============================================================================
--- trunk/gcalctool/functions.c (original)
+++ trunk/gcalctool/functions.c Tue Mar 11 03:36:45 2008
@@ -292,7 +292,11 @@
usable_num(int MPnum[MP_SIZE])
{
struct exprm_state *e = get_state();
- return ce_parse(e->expression, MPnum);
+ if (e->expression[0] == '\0') {
+ return ce_parse("0", MPnum);
+ } else {
+ return ce_parse(e->expression, MPnum);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]