summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:22:56 (GMT)
committer Don Pellegrino <don@coffee.donpellegrino.com>2009-08-14 19:22:56 (GMT)
commitcc84337c371ff6b7bebffec6a94ac33ca5061438 (patch) (unidiff)
treee941c9a35aa78c5a116c78c4dc0a93e6a7908e44
parentb816eed89d569d5cdcf6bae708605b80d9f8d13b (diff)
downloadexp005-cc84337c371ff6b7bebffec6a94ac33ca5061438.zip
exp005-cc84337c371ff6b7bebffec6a94ac33ca5061438.tar.gz
exp005-cc84337c371ff6b7bebffec6a94ac33ca5061438.tar.bz2
Modified to use dynamic memory allocation for the number of nodes.
-rw-r--r--src/controller/selsave.sqc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller/selsave.sqc b/src/controller/selsave.sqc
index 2c6005f..8c192ad 100644
--- a/src/controller/selsave.sqc
+++ b/src/controller/selsave.sqc
@@ -25,11 +25,11 @@ selsave (void)
25 EXEC SQL DELETE FROM vis_selection WHERE gi IS NOT NULL;25 EXEC SQL DELETE FROM vis_selection WHERE gi IS NOT NULL;
26 check_error (__FILE__, __LINE__);26 check_error (__FILE__, __LINE__);
2727
28 for (unsigned int i = 0; i < ROWS; i++)28 for (unsigned int i = 0; i < S.rows; i++)
29 {29 {
30 if (S.selection.set[i] == true)30 if (S.selection.set[i] == true)
31 {31 {
32 strncpy (gi, S.gi_data[i] + 3, sizeof (gi));32 strncpy (gi, S.gi_data + i + 3, sizeof (gi));
33 EXEC SQL INSERT INTO vis_selection VALUES (:gi);33 EXEC SQL INSERT INTO vis_selection VALUES (:gi);
34 }34 }
35 }35 }

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.