Skip to content

Commit

Permalink
Morecompatibilitybitmapfile (#135)
Browse files Browse the repository at this point in the history
* Fix reading structures

* style
  • Loading branch information
Makuna authored Sep 28, 2016
1 parent 12d25bf commit b41674d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/internal/NeoBitmapFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ template<typename T_COLOR_FEATURE, typename T_FILE_METHOD> class NeoBitmapFile

BitmapFileHeader bmpHeader;
BitmapInfoHeader bmpInfoHeader;
int result;
size_t result;

result = _file.read(&bmpHeader, sizeof(bmpHeader));
result = _file.read((uint8_t*)(&bmpHeader), sizeof(bmpHeader));

if (result != sizeof(bmpHeader) ||
bmpHeader.FileId != c_BitmapFileId ||
Expand All @@ -113,7 +113,7 @@ template<typename T_COLOR_FEATURE, typename T_FILE_METHOD> class NeoBitmapFile
goto error;
}

result = _file.read(&bmpInfoHeader, sizeof(bmpInfoHeader));
result = _file.read((uint8_t*)(&bmpInfoHeader), sizeof(bmpInfoHeader));

if (result != sizeof(bmpInfoHeader) ||
result != bmpInfoHeader.Size ||
Expand Down

0 comments on commit b41674d

Please sign in to comment.