diff scn2k/scn2k_impl.cc @ 62:3b1593186f12

fix pointers used to get strchr result
author Thibaut GIRKA <thib@sitedethib.com>
date Sat, 06 Feb 2010 17:03:47 +0100
parents bdd8a5ff8f46
children 4416cfac86ae
line wrap: on
line diff
--- a/scn2k/scn2k_impl.cc
+++ b/scn2k/scn2k_impl.cc
@@ -1275,7 +1275,7 @@ void Scn2k::LoadImpl(const char* save) {
 			sscanf(save, "Point=%d", &save_point);
 		} else if (strncmp(save, "Title=", 6) == 0) {
 			save += 6;
-			char* s = strchr(save, '\n');
+			const char* s = strchr(save, '\n');
 			if (s == NULL) window_title = save;
 			else window_title.assign(save, s-save);
 			const char* config_name = config->GetParaStr("#CAPTION");
@@ -1295,7 +1295,7 @@ void Scn2k::LoadImpl(const char* save) {
 			stack.push_back( StackItem(scn, pt));
 		} else if (strncmp(save, "StackStr=", 9) == 0) {
 			save += 9;
-			char* s = strchr(save, '\n');
+			const char* s = strchr(save, '\n');
 			if (s == NULL) stack_strbuffer.push_back("");
 			else stack_strbuffer.push_back(string(save, s-save));
 		} else if (strncmp(save, "Cmd=", 4) == 0) {