(svn r5873) - Fix a bad comment in r5871, and add a further check for saving strings.
authorDarkvater
Sun, 13 Aug 2006 08:51:55 +0000
changeset 4257 6a8b510d5137
parent 4256 5e29191a88a1
child 4258 087d44b3514f
(svn r5873) - Fix a bad comment in r5871, and add a further check for saving strings.
saveload.c
saveload.h
--- a/saveload.c	Sun Aug 13 08:18:11 2006 +0000
+++ b/saveload.c	Sun Aug 13 08:51:55 2006 +0000
@@ -516,7 +516,8 @@
 {
 	uint len;
 	assert(GetVarFileType(conv) == SLE_FILE_STRING);
-	assert(GetVarMemType(conv) == SLE_VAR_STRB || GetVarMemType(conv) == SLE_VAR_STRQ);
+	assert(GetVarMemType(conv) == SLE_VAR_STRB || GetVarMemType(conv) == SLE_VAR_STRBQ);
+	assert(ptr != NULL);
 
 	if (_sl.save) {
 		len = SlCalcNetStringLen(ptr, length);
--- a/saveload.h	Sun Aug 13 08:18:11 2006 +0000
+++ b/saveload.h	Sun Aug 13 08:51:55 2006 +0000
@@ -98,9 +98,9 @@
 	SLE_VAR_U64  =  8 << 4,
 	SLE_VAR_NULL =  9 << 4, ///< useful to write zeros in savegame.
 	SLE_VAR_STRB = 10 << 4, ///< normal string (with pre-allocated buffer)
-	SLE_VAR_STRBQ= 11 << 4, ///< string enclosed in parentheses (with pre-allocated buffer)
+	SLE_VAR_STRBQ= 11 << 4, ///< string enclosed in quotes (with pre-allocated buffer)
 	SLE_VAR_STR  = 12 << 4, ///< string pointer
-	SLE_VAR_STRQ = 13 << 4, ///< string enclosed in parentheses
+	SLE_VAR_STRQ = 13 << 4, ///< string enclosed in quotes
 	/* 2 more possible memory-primitives */
 
 	/* Shortcut values */