summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@coffee.donpellegrino.com>2009-08-28 18:31:25 (GMT)
committer Don Pellegrino <don@coffee.donpellegrino.com>2009-08-28 18:31:25 (GMT)
commit26674de6b8649e9bb16b9f31700eabb6b8630594 (patch) (side-by-side diff)
tree4da96494f3f0a7e5dd566a76bcf1362b9668525b
parent7daba56120e9ee17ad9db4c885ef7e2dd927cb69 (diff)
downloadexp005-26674de6b8649e9bb16b9f31700eabb6b8630594.zip
exp005-26674de6b8649e9bb16b9f31700eabb6b8630594.tar.gz
exp005-26674de6b8649e9bb16b9f31700eabb6b8630594.tar.bz2
Fix to terminate string of GI value when loaded from DB2.
-rw-r--r--src/model/data/base.sqc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/model/data/base.sqc b/src/model/data/base.sqc
index f15d18b..41a651c 100644
--- a/src/model/data/base.sqc
+++ b/src/model/data/base.sqc
@@ -71,6 +71,7 @@ base (void)
char *gi_data_row = S.gi_data + (i * 20);
strncpy (gi_data_row, coordinates.gi.data, sizeof (char) * 20);
+ *(gi_data_row + coordinates.gi.length) = '\0';
float *v = S.base_vertices_data + (i * 2);
*v = coordinates.x;

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.