Skip to content

Commit

Permalink
little adjust on safe_strncpy()
Browse files Browse the repository at this point in the history
  • Loading branch information
White Dragon committed Jun 4, 2018
1 parent 18f3810 commit 36208c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/source/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ char* safe_strncpy(char* dest, const char* source, size_t size)
char src[size + 1];
memset(src,'\0',size + 1);
strncpy(src,source,size);
src[size] = '\0';
strncpy(dest,src,size);
return dest;
}
Expand Down

0 comments on commit 36208c2

Please sign in to comment.