File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,19 +39,19 @@ bool laco_is_match(const char** matches, const char* test_string) {
3939 return false;
4040}
4141
42- char * * laco_split_by (const char * split_with , char * string ,
42+ char * * laco_split_by (const char split_with , char * string ,
4343 int ignore_repeats ) {
4444 if (string == NULL ) return NULL ;
4545
4646 char * * result = calloc (16 , sizeof (char * ));
4747 size_t i = 0 ;
4848
4949 while (1 ) {
50- result [i ] = strsep (& string , split_with );
50+ result [i ] = strsep (& string , & split_with );
5151
5252 if (result [i ] == NULL ) break ;
5353
54- if (ignore_repeats ) ignore_extra (split_with [ 0 ] , & string );
54+ if (ignore_repeats ) ignore_extra (split_with , & string );
5555
5656 i += 1 ;
5757 }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ bool laco_is_match(const char** matches, const char* test_string);
4444 * Break the provided string into an array of strings that are between the
4545 * split_with value. The last value of this array will be NULL.
4646 */
47- char * * laco_split_by (const char * split_with , char * string ,
47+ char * * laco_split_by (const char split_with , char * string ,
4848 int ignore_repeats );
4949
5050/* Macro for splitting with spaces */
You can’t perform that action at this time.
0 commit comments