[Scummvm-cvs-logs] scummvm master -> e664e9167a599e1e8ac7d8bb8f5349547fb49832

dreammaster dreammaster at scummvm.org
Mon Mar 2 00:22:54 CET 2015


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:
e664e9167a MADS: Fix display of teleporter values with leading zeroes


Commit: e664e9167a599e1e8ac7d8bb8f5349547fb49832
    https://github.com/scummvm/scummvm/commit/e664e9167a599e1e8ac7d8bb8f5349547fb49832
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-03-01T18:21:39-05:00

Commit Message:
MADS: Fix display of teleporter values with leading zeroes

Changed paths:
    engines/mads/nebular/nebular_scenes.cpp



diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp
index b5e2491..0019118 100644
--- a/engines/mads/nebular/nebular_scenes.cpp
+++ b/engines/mads/nebular/nebular_scenes.cpp
@@ -451,7 +451,10 @@ void SceneTeleporter::teleporterHandleKey() {
 				_curCode *= 10;
 				_curCode += _buttonTyped;
 				_digitCount++;
-				_msgText = Common::String::format("%d", _curCode);
+
+				Common::String format = "%01d";
+				format.setChar('0' + _digitCount, 2);
+				_msgText = Common::String::format(format.c_str(), _curCode);
 				if (_digitCount < 4)
 					_msgText += "_";
 






More information about the Scummvm-git-logs mailing list