Fixed a precision bug that caused signed 32 bit integers to not work

properly.
This commit is contained in:
Collin Kidder
2015-11-23 09:19:47 -05:00
parent 1d89fe576e
commit 70ebfc19c7
+2 -2
View File
@@ -960,7 +960,7 @@ void GraphingWindow::createGraph(GraphParams &params, bool createGraphParam)
float tempValue;
int64_t tempValInt;
int numBytes = (params.endByte - params.startByte) + 1;
int64_t shiftRef = 1 << (numBytes * 8);
int64_t shiftRef = (uint64_t)1 << (numBytes * 8);
uint64_t maskShifter;
uint8_t tempByte;
for (int j = 0; j < numEntries; j++)
@@ -1010,7 +1010,7 @@ void GraphingWindow::createGraph(GraphParams &params, bool createGraphParam)
float tempValue;
int64_t tempValInt;
int numBytes = (params.startByte - params.endByte) + 1;
int64_t shiftRef = 1 << (numBytes * 8);
int64_t shiftRef = (uint64_t)1 << (numBytes * 8);
uint64_t maskShifter;
uint8_t tempByte;
for (int j = 0; j < numEntries; j++)