Skip to content

Commit

Permalink
Fix offset value for Bitmap::set_data
Browse files Browse the repository at this point in the history
  • Loading branch information
mmertama committed Sep 8, 2024
1 parent a565bb9 commit 0c15b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gempyrelib/include/gempyre_bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ namespace Gempyre {
bool set_data(const T& bytes, size_t offset = 0) {
if(bytes.size() + offset > size())
return false;
std::memcpy(inner_data() + offset, bytes.data(), sizeof(Color::type) * bytes.size());
std::memcpy(inner_data() + offset * sizeof(Color::type), bytes.data(), sizeof(Color::type) * bytes.size());
return true;
}

Expand Down

0 comments on commit 0c15b6b

Please sign in to comment.