Fix writing of screenshot magic to be reliable
This commit is contained in:
parent
aa9881278e
commit
ec76e05b50
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ void framebuffer_raw::save(std::vector<char>& data) throw(std::bad_alloc)
|
|||
default:
|
||||
//Choose the first two bytes so that screenshot is bad in legacy format.
|
||||
m = 2;
|
||||
while(width * height % m == 0)
|
||||
while((sbpp * width * height + 8) % (3 * m) == 2)
|
||||
m++;
|
||||
offset = 8;
|
||||
data.resize(offset + sbpp * static_cast<size_t>(width) * height);
|
||||
|
|
Loading…
Add table
Reference in a new issue