Fixed a precision bug that caused signed 32 bit integers to not work
properly.
This commit is contained in:
+2
-2
@@ -960,7 +960,7 @@ void GraphingWindow::createGraph(GraphParams ¶ms, bool createGraphParam)
|
|||||||
float tempValue;
|
float tempValue;
|
||||||
int64_t tempValInt;
|
int64_t tempValInt;
|
||||||
int numBytes = (params.endByte - params.startByte) + 1;
|
int numBytes = (params.endByte - params.startByte) + 1;
|
||||||
int64_t shiftRef = 1 << (numBytes * 8);
|
int64_t shiftRef = (uint64_t)1 << (numBytes * 8);
|
||||||
uint64_t maskShifter;
|
uint64_t maskShifter;
|
||||||
uint8_t tempByte;
|
uint8_t tempByte;
|
||||||
for (int j = 0; j < numEntries; j++)
|
for (int j = 0; j < numEntries; j++)
|
||||||
@@ -1010,7 +1010,7 @@ void GraphingWindow::createGraph(GraphParams ¶ms, bool createGraphParam)
|
|||||||
float tempValue;
|
float tempValue;
|
||||||
int64_t tempValInt;
|
int64_t tempValInt;
|
||||||
int numBytes = (params.startByte - params.endByte) + 1;
|
int numBytes = (params.startByte - params.endByte) + 1;
|
||||||
int64_t shiftRef = 1 << (numBytes * 8);
|
int64_t shiftRef = (uint64_t)1 << (numBytes * 8);
|
||||||
uint64_t maskShifter;
|
uint64_t maskShifter;
|
||||||
uint8_t tempByte;
|
uint8_t tempByte;
|
||||||
for (int j = 0; j < numEntries; j++)
|
for (int j = 0; j < numEntries; j++)
|
||||||
|
|||||||
Reference in New Issue
Block a user