fix integer overflow in line_atlas

This commit is contained in:
Dane Springmeyer
2015-05-08 14:52:33 -07:00
parent 5ef362bbc4
commit 04c73e5ae1
2 changed files with 2 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ using namespace mbgl;
LineAtlas::LineAtlas(uint16_t w, uint16_t h)
: width(w),
height(h),
data(new char[w * h]),
data(new uint8_t[w * h]),
dirty(true) {
}

View File

@@ -34,7 +34,7 @@ public:
private:
std::recursive_mutex mtx;
char *const data = nullptr;
uint8_t *const data = nullptr;
std::atomic<bool> dirty;
uint32_t texture = 0;
int nextRow = 0;