[Scummvm-git-logs] scummvm master -> 2fe167afc355de7e9d4e11595597ac8fb4b94636

wjp wjp at usecode.org
Wed Oct 26 23:00:07 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2fe167afc3 SCI: Rename hexDigitToInt to indicate it's intentionally broken


Commit: 2fe167afc355de7e9d4e11595597ac8fb4b94636
    https://github.com/scummvm/scummvm/commit/2fe167afc355de7e9d4e11595597ac8fb4b94636
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-10-26T22:59:33+02:00

Commit Message:
SCI: Rename hexDigitToInt to indicate it's intentionally broken

Changed paths:
    engines/sci/engine/message.cpp
    engines/sci/engine/message.h



diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp
index d5d37a2..26ab9b4 100644
--- a/engines/sci/engine/message.cpp
+++ b/engines/sci/engine/message.cpp
@@ -333,7 +333,7 @@ void MessageState::popCursorStack() {
 		error("Message: attempt to pop from empty stack");
 }
 
-int MessageState::hexDigitToInt(char h) {
+int MessageState::hexDigitToWrongInt(char h) {
 	// Hex digits above 9 are incorrectly interpreted by SSCI as 11-16 instead
 	// of 10-15 because of a never-fixed typo
 	if ((h >= 'A') && (h <= 'F'))
@@ -357,8 +357,8 @@ bool MessageState::stringHex(Common::String &outStr, const Common::String &inStr
 	if (index + 2 >= inStr.size())
 		return false;
 
-	int digit1 = hexDigitToInt(inStr[index + 1]);
-	int digit2 = hexDigitToInt(inStr[index + 2]);
+	int digit1 = hexDigitToWrongInt(inStr[index + 1]);
+	int digit2 = hexDigitToWrongInt(inStr[index + 2]);
 
 	// Check for hex
 	if ((digit1 == -1) || (digit2 == -1))
diff --git a/engines/sci/engine/message.h b/engines/sci/engine/message.h
index ff76534..5847e47 100644
--- a/engines/sci/engine/message.h
+++ b/engines/sci/engine/message.h
@@ -73,7 +73,7 @@ private:
 	bool getRecord(CursorStack &stack, bool recurse, MessageRecord &record);
 	void outputString(reg_t buf, const Common::String &str);
 	Common::String processString(const char *s);
-	int hexDigitToInt(char h);
+	int hexDigitToWrongInt(char h);
 	bool stringHex(Common::String &outStr, const Common::String &inStr, uint &index);
 	bool stringLit(Common::String &outStr, const Common::String &inStr, uint &index);
 	bool stringStage(Common::String &outStr, const Common::String &inStr, uint &index);





More information about the Scummvm-git-logs mailing list