Skip to content
Myr

stb_sprintf: avoid clang -O3 misaligned access

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parent f54acd4 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:stb_sprintf.h+1 added-1 removed
1227 unmodified lines
1228 stbsp__int32 i;1229 stbsp__cb_buf_clamp(i, n);1230 n -= i;1231 STBSP__UNALIGNED(while (i >= 4) {1232 *(stbsp__uint32 *)bf = *(stbsp__uint32 *)s;1232 *(stbsp__uint32 volatile *)bf = *(stbsp__uint32 volatile *)s;1233 bf += 4;1234 s += 4;1235 i -= 4;1236 })
643 unmodified lines