aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/base_persistence_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/base/base_persistence_manager.cpp')
-rw-r--r--engines/wintermute/base/base_persistence_manager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index 995b996b33..ce7c66b7dd 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -492,7 +492,7 @@ float BasePersistenceManager::getFloat() {
}
void BasePersistenceManager::putDouble(double val) {
- Common::String str = Common::String::format("F%f", val);
+ Common::String str = Common::String::format("D%f", val);
str.format("D%f", val);
_saveStream->writeUint32LE(str.size());
_saveStream->writeString(str);
@@ -500,10 +500,10 @@ void BasePersistenceManager::putDouble(double val) {
double BasePersistenceManager::getDouble() {
char *str = getString();
- double value = 0.0f;
- int ret = sscanf(str, "F%f", &value);
+ float value = 0.0f; // TODO: Do we ever really need to carry a full double-precision number?
+ int ret = sscanf(str, "D%f", &value);
if (ret != 1) {
- warning("%s not parsed as float", str);
+ warning("%s not parsed as double", str);
}
delete[] str;
return value;