Skip to content
Myr

Corrected fix for stb_insertn

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

On insert the memmove length wasn't incorrect but the addlen call was.

authored by blackpawn · committed by blackpawn · parent 28f1b0f · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:stb.h+2 added-2 removed
3246 unmodified lines
3247 return;3248 }32493250 z = stb_arr_len2(p);3251 stb__arr_addlen_(&p, size, i STB__ARGS);3252 memmove((char *) p + (i+n)*size, (char *) p + i*size, size * (z-(i+n)));3251 stb__arr_addlen_(&p, size, n STB__ARGS);3252 memmove((char *) p + (i+n)*size, (char *) p + i*size, size * (z-i));3253 }3254 *pp = p;3255}3256
10880 unmodified lines