char pointer misconception for newline characters

This commit is contained in:
Diptanshu8 2017-03-16 16:09:06 +05:30
parent 7212d6848a
commit baa70a104a

View File

@ -798,7 +798,7 @@ void save_sub_track(struct matroska_ctx* mkv_ctx, struct matroska_sub_track* tra
write(desc, timestamp_end, strlen(timestamp_start));
write(desc, "\n", 1);
int size=0;
while (sentence->text+size=='\n' || sentence->text+size=='\r' )
while (*(sentence->text+size)=='\n' || *(sentence->text+size)=='\r' )
size++;
write(desc, sentence->text+size, sentence->text_size-size);
write(desc, "\n\n", 2);