mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Corrects potential wrap error for non-single-byte targets.
This commit is contained in:
parent
5e1570258d
commit
f9a35c6636
@ -232,7 +232,7 @@ void ScanTarget::end_data(size_t actual_length) {
|
||||
// distance left on the current line, but there's a risk of exactly filling
|
||||
// the final line, in which case this should wrap back to 0.
|
||||
write_pointers_.write_area += actual_length + 1;
|
||||
write_pointers_.write_area %= write_area_texture_.size();
|
||||
write_pointers_.write_area %= (write_area_texture_.size() / data_type_size_);
|
||||
|
||||
// Also bookend the end.
|
||||
memcpy(
|
||||
|
Loading…
Reference in New Issue
Block a user