Skip to content

Commit e75e066

Browse files
authored
Onset Hobo negative level fix (#620)
1 parent 42ce4f4 commit e75e066

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/decoder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ double TheengsDecoder::value_from_hex_string(const char* data_str,
106106
DEBUG_PRINT("extracted value from %s = %lld\n", data.c_str(), (long long)value);
107107
} else {
108108
union {
109-
long longV;
109+
long long longV;
110110
float floatV;
111111
};
112-
longV = strtol(data.c_str(), NULL, 16);
113-
DEBUG_PRINT("extracted float value from %s = %f\n", data.c_str(), floatV);
112+
longV = strtoll(data.c_str(), NULL, 16);
113+
DEBUG_PRINT("extracted float value from %s = %lld = %f\n", data.c_str(), (long long)longV, floatV);
114114
value = floatV;
115115
}
116116

0 commit comments

Comments
 (0)