projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: Fix segfault when pushing Del on a long string variable cell.
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-data-store.c
diff --git
a/src/ui/gui/psppire-data-store.c
b/src/ui/gui/psppire-data-store.c
index 8808fd32588fe29f46b73dfe232a1dfccdf620a6..9ce07ae2caa58f11e39fa351da7c47174ee393c6 100644
(file)
--- a/
src/ui/gui/psppire-data-store.c
+++ b/
src/ui/gui/psppire-data-store.c
@@
-653,12
+653,11
@@
psppire_data_store_clear_datum (PsppireSheetModel *model,
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
union value v;
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
union value v;
- int width;
const struct variable *pv = psppire_dict_get_variable (store->dict, col);
const struct variable *pv = psppire_dict_get_variable (store->dict, col);
+ int width = var_get_width (pv);
const gint index = var_get_case_index (pv) ;
const gint index = var_get_case_index (pv) ;
- width = var_is_numeric (pv) ? 0 : MAX_SHORT_STRING;
value_init (&v, width);
value_set_missing (&v, width);
psppire_data_store_set_value (store, row, index, &v);
value_init (&v, width);
value_set_missing (&v, width);
psppire_data_store_set_value (store, row, index, &v);