Skip to content
Myr

Merge branch 'fix-stb_include_strings' of https://github.com/sp0lsh/stb into work2

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 · parents ca1b581, 221a9ef · Browse files · 1 file+9 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+9 added−2 removed

  • other:+9 added−2 removed

1 file+9 added−2 removed

modified:stb_include.h+9 added-2 removed
24 unmodified lines
25//26// stdio.h FILE, fopen, fclose, fseek, ftell27// stdlib.h malloc, realloc, free28// string.h strcpy, strncmp, memcpy29//30// Credits:31// 32// Written by Sean Barrett.33// 34// Fixes:35// Michal Klos3637#ifndef STB_INCLUDE_STB_INCLUDE_H38#define STB_INCLUDE_STB_INCLUDE_H39
215 unmodified lines
255 char *text;256 char *result;257 int i;258 size_t length=0;252 for (i=0; i < count; ++count)259 for (i=0; i < count; ++i)260 length += strlen(strs[i]);261 text = (char *) malloc(length+1);262 length = 0;256 for (i=0; i < count; ++count) {263 for (i=0; i < count; ++i) {264 strcpy(text + length, strs[i]);265 length += strlen(strs[i]);266 }267 result = stb_include_string(text, inject, path_to_includes, filename, error);
28 unmodified lines