Skip to content
Myr

better to just use stb_strncpy inside stb__splitpath_raw, also fixed an indexing bug in stb_strncpy itself.

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

authored by Brian Collins · committed by Brian Collins · parent 7c44b15 · Browse files · 1 file+2 added−3 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−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:stb.h+2 added-3 removed
2007 unmodified lines
20082009char *stb_strncpy(char *s, char *t, int n)2010{2011 stb_p_strncpy_s(s,n+1,t,n);2012 s[n-1] = 0;2012 s[n] = 0;2013 return s;2014}20152016char *stb_substr(char *t, int n)
439 unmodified lines
2456 if (!buffer) return NULL;2457 }24582459 if (len) { stb_p_strcpy_s(buffer, sizeof(buffer), "./"); return buffer; }2460 stb_p_strncpy_s(buffer, y-x+1, path+x, y-x);2461 buffer[y-x] = 0;2460 stb_strncpy(buffer, path+x, y-x);2461 return buffer;2462}24632464char *stb_splitpath(char *output, char *src, int flag)
11989 unmodified lines