Skip to content

Commit

Permalink
Fixed str split function
Browse files Browse the repository at this point in the history
  • Loading branch information
kala13x committed May 1, 2023
1 parent 5d1e315 commit 15ec489
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/xstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,10 @@ xarray_t* xstrsplit(const char *pString, const char *pDlmt)

while((nNext = xstrntok(sToken, sizeof(sToken), pString, nNext, pDlmt)) >= 0)
{
XArray_AddData(pArray, sToken, strlen(sToken)+1);
size_t nLength = strlen(sToken);
if (!nLength) continue;

XArray_AddData(pArray, sToken, nLength+1);
if (!nNext) break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/xver.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#define XUTILS_VERSION_MAX 2
#define XUTILS_VERSION_MIN 4
#define XUTILS_BUILD_NUMBER 57
#define XUTILS_BUILD_NUMBER 58

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 15ec489

Please sign in to comment.