gui: fixed crash when entering data for user defined currency variable
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sun, 3 Jun 2018 21:24:54 +0000 (23:24 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Sun, 3 Jun 2018 21:24:54 +0000 (23:24 +0200)
psppire crashed when data is entered for a variable of type
user defined currency. The bug description is:

https://savannah.gnu.org/bugs/index.php?54036

which was first reported by Larissa Setzer. The reason was
that currency format was not handled as number. This patch
fixes this bug.

src/data/data-in.c

index 3f1f9e7075643b5bd86eabc7a57f01738a475f0a..d06d0f42765cdc27791315b939ade6b0a0399748 100644 (file)
@@ -113,7 +113,7 @@ data_in (struct substring input, const char *input_encoding,
     }
 
   cat = fmt_get_category (format);
-  if (cat & (FMT_CAT_BASIC | FMT_CAT_HEXADECIMAL
+  if (cat & (FMT_CAT_BASIC | FMT_CAT_HEXADECIMAL | FMT_CAT_CUSTOM
              | FMT_CAT_DATE | FMT_CAT_TIME | FMT_CAT_DATE_COMPONENT))
     {
       /* We're going to parse these into numbers.  For this purpose we want to