diff scn2k/scn2k_cmd.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 d7cde171a1de
children 4b9ffe15a87d
line wrap: on
line diff
--- a/scn2k/scn2k_cmd.cc
+++ b/scn2k/scn2k_cmd.cc
@@ -266,9 +266,9 @@ void Flags::Load(const char* save) {
 					char buf[1024];
 					int n;
 					if (sscanf(save, "V<C>[%04d]=",&n) == 1) {
-						char* s = strchr(save, '=');
+						const char* s = strchr(save, '=');
 						s++;
-						char* send = strchr(s, '\n');
+						const char* send = strchr(s, '\n');
 						int slen = send - s;
 						strncpy(buf, s, slen);
 						buf[slen] = 0;
@@ -335,9 +335,9 @@ void Flags::LoadSys(const char* save) { 
 					char buf[1024];
 					int n;
 					if (sscanf(save, "V<M>[%04d]=",&n) == 1) {
-						char* s = strchr(save, '=');
+						const char* s = strchr(save, '=');
 						s++;
-						char* send = strchr(s, '\n');
+						const char* send = strchr(s, '\n');
 						int slen = send - s;
 						strncpy(buf, s, slen);
 						buf[slen] = 0;