diff options
| author | Josh Faust <jfaust@fyusion.com> | 2021-01-20 16:32:21 -0800 |
|---|---|---|
| committer | Josh Faust <jfaust@fyusion.com> | 2021-01-20 16:32:21 -0800 |
| commit | 5bc1b13a7d0082d64e168f933aa645ccd119553a (patch) | |
| tree | 47efddb231fa695b413ba5bd69a5baed5115755d /sokol_fetch.h | |
| parent | 5fbb6a25501e5478674ca0600a7539033592d749 (diff) | |
Fix range request to not overlap reads
Diffstat (limited to 'sokol_fetch.h')
| -rw-r--r-- | sokol_fetch.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sokol_fetch.h b/sokol_fetch.h index c40da9c4..1a8ac54b 100644 --- a/sokol_fetch.h +++ b/sokol_fetch.h @@ -1942,7 +1942,7 @@ EM_JS(void, sfetch_js_send_get_request, (uint32_t slot_id, const char* path_cstr req.responseType = 'arraybuffer'; var need_range_request = (bytes_to_read > 0); if (need_range_request) { - req.setRequestHeader('Range', 'bytes='+offset+'-'+(offset+bytes_to_read)); + req.setRequestHeader('Range', 'bytes='+offset+'-'+(offset+bytes_to_read-1)); } req.onreadystatechange = function() { if (this.readyState == this.DONE) { |