]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix another bug in subtitles parsing (badly parsed negative length)
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 24 Apr 2010 18:30:51 +0000 (18:30 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 24 Apr 2010 18:30:51 +0000 (18:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10102 d7cf8633-e32d-0410-b094-e92efae38249

cl_video.c

index 3cd9860da06d3777fcd7145cca867d6ea6f7c398..e7f44cacfd383a548a28d3e11dacc7dd99c987e7 100644 (file)
@@ -139,7 +139,7 @@ static void LoadSubtitles( clvideo_t *video, const char *subtitlesfile )
                if (numsubs > 0) // make true len for prev sub, autofix overlapping subtitles
                {
                        if (video->subtitle_end[numsubs-1] <= 0)
-                               video->subtitle_end[numsubs-1] = max(video->subtitle_start[numsubs-1], video->subtitle_start[numsubs] - video->subtitle_end[numsubs-1]);
+                               video->subtitle_end[numsubs-1] = max(video->subtitle_start[numsubs-1], video->subtitle_start[numsubs] + video->subtitle_end[numsubs-1]);
                        else
                                video->subtitle_end[numsubs-1] = min(video->subtitle_start[numsubs-1] + video->subtitle_end[numsubs-1], video->subtitle_start[numsubs]);
                }