diff options
Diffstat (limited to 'engines/wintermute/base/base.cpp')
| -rw-r--r-- | engines/wintermute/base/base.cpp | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/wintermute/base/base.cpp b/engines/wintermute/base/base.cpp index a64770c577..6a0666b36e 100644 --- a/engines/wintermute/base/base.cpp +++ b/engines/wintermute/base/base.cpp @@ -60,7 +60,7 @@ Common::String BaseClass::getEditorProp(const Common::String &propName, const Co  	if (_editorPropsIter != _editorProps.end()) {  		return _editorPropsIter->_value.c_str();  	} else { -		return initVal; +		return initVal; // Used to be NULL  	}  } @@ -87,7 +87,7 @@ TOKEN_DEF(NAME)  TOKEN_DEF(VALUE)  TOKEN_DEF_END  ////////////////////////////////////////////////////////////////////////// -bool BaseClass::parseEditorProperty(byte *buffer, bool complete) { +bool BaseClass::parseEditorProperty(char *buffer, bool complete) {  	TOKEN_TABLE_START(commands)  	TOKEN_TABLE(EDITOR_PROPERTY)  	TOKEN_TABLE(NAME) @@ -100,12 +100,12 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {  	} -	byte *params; +	char *params;  	int cmd;  	BaseParser parser;  	if (complete) { -		if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_EDITOR_PROPERTY) { +		if (parser.getCommand(&buffer, commands, ¶ms) != TOKEN_EDITOR_PROPERTY) {  			BaseEngine::LOG(0, "'EDITOR_PROPERTY' keyword expected.");  			return STATUS_FAILED;  		} @@ -115,13 +115,13 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {  	char *propName = nullptr;  	char *propValue = nullptr; -	while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) { +	while ((cmd = parser.getCommand(&buffer, commands, ¶ms)) > 0) {  		switch (cmd) {  		case TOKEN_NAME:  			delete[] propName; -			propName = new char[strlen((char *)params) + 1]; +			propName = new char[strlen(params) + 1];  			if (propName) { -				strcpy(propName, (char *)params); +				strcpy(propName, params);  			} else {  				cmd = PARSERR_GENERIC;  			} @@ -129,9 +129,9 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {  		case TOKEN_VALUE:  			delete[] propValue; -			propValue = new char[strlen((char *)params) + 1]; +			propValue = new char[strlen(params) + 1];  			if (propValue) { -				strcpy(propValue, (char *)params); +				strcpy(propValue, params);  			} else {  				cmd = PARSERR_GENERIC;  			}  | 
