From cc84337c371ff6b7bebffec6a94ac33ca5061438 Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Fri, 14 Aug 2009 19:22:56 +0000 Subject: Modified to use dynamic memory allocation for the number of nodes. --- 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); } } -- cgit v0.8.3.1-22-g547a