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) (side-by-side diff)
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)
EXEC SQL DELETE FROM vis_selection WHERE gi IS NOT NULL;
check_error (__FILE__, __LINE__);
- for (unsigned int i = 0; i < ROWS; i++)
+ for (unsigned int i = 0; i < S.rows; i++)
{
if (S.selection.set[i] == true)
{
- strncpy (gi, S.gi_data[i] + 3, sizeof (gi));
+ strncpy (gi, S.gi_data + i + 3, sizeof (gi));
EXEC SQL INSERT INTO vis_selection VALUES (:gi);
}
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.