diff options
author | John Stebbins <[email protected]> | 2019-01-07 12:34:29 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-01-14 13:36:08 -0800 |
commit | ef6777ea094ed5a2f830136e1ec7b4220d421f97 (patch) | |
tree | ff3a3d08b9379e8327bbb85b638009355e6feef6 /libhb/ssautil.c | |
parent | 5154729becab0465462027d93d9293fb3ddca49c (diff) |
ssautil: fix strndup on mingw
Diffstat (limited to 'libhb/ssautil.c')
-rw-r--r-- | libhb/ssautil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libhb/ssautil.c b/libhb/ssautil.c index 96ab11bb2..108b46f89 100644 --- a/libhb/ssautil.c +++ b/libhb/ssautil.c @@ -147,7 +147,7 @@ static int ssa_update_style(const char *ssa, hb_subtitle_style_context_t *ctx) if (ssa[pos] == 'r') { // Style reset - char * style = strndup(ssa + pos + 1, end - (pos + 1)); + char * style = hb_strndup(ssa + pos + 1, end - (pos + 1)); ssa_style_set(ctx, style); free(style); } @@ -284,7 +284,7 @@ static char * get_field(char ** pos) char * end = strchr(start, ','); if (end != NULL) { - result = strndup(start, end - start); + result = hb_strndup(start, end - start); *pos = end + 1; } else @@ -315,7 +315,7 @@ static char * sgetline(char * str) } if (eol != NULL) { - return strndup(str, eol - str); + return hb_strndup(str, eol - str); } else { |