bugfix, reset dataBuffer in DataPlane before append new data

This commit is contained in:
Michael Nilsson
2016-05-09 09:09:47 -04:00
parent ea5006f9c6
commit 819b227976

View File

@@ -102,6 +102,7 @@ bool DataPlane::loadTexture() {
if(dataFile.corrupted)
return false;
_dataBuffer = "";
_dataBuffer.append(dataFile.buffer, dataFile.size);
}
@@ -342,7 +343,7 @@ std::vector<float*> DataPlane::readData(std::string& dataBuffer){
numValues++;
}
}
std::cout << "Actual size: " << numValues << " Expected: " << _dimensions.x*_dimensions.y << std::endl;
if(numValues != _dimensions.x*_dimensions.y){
LWARNING("Number of values read and expected are not the same");
return std::vector<float*>();