ALT Linux repos
S: | 1.5-alt1.38416.2 |
D: | 1.0-alt35.27330.1 |
5.0: | 1.0-alt35.27654.3 |
4.1: | 1.0-alt35.26470.1 |
4.0: | 1.0-alt35.23722.M40.1 |
Group :: Video
RPM: mplayer
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: 0006-fixed-subreader.patch
Download
Download
From 6e2730fb4dfe043680184734a78b156344b49c7e Mon Sep 17 00:00:00 2001
From: Led <led@altlinux.org>
Date: Sat, 25 May 2013 05:47:09 +0300
Subject: [PATCH] fixed subreader
---
MPlayer/sub/subreader.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/MPlayer/sub/subreader.c b/MPlayer/sub/subreader.c
index 3c815d1320..a1f05c4d63 100644
--- a/MPlayer/sub/subreader.c
+++ b/MPlayer/sub/subreader.c
@@ -1888,22 +1888,16 @@ char * strreplace( char * in,char * what,char * whereof )
static void strcpy_trim(char *d, const char *s)
{
// skip leading whitespace
- while (*s && isspace(*s)) {
- s++;
- }
- for (;;) {
+ for (; *s && isascii(*s) && !isalnum(*s); s++);
+ for (;; d++) {
// copy word
- while (*s && !isspace(*s)) {
- *d = tolower(*s);
- s++; d++;
- }
+ for (; *s && (!isascii(*s) || isalnum(*s)); s++, d++)
+ *d = *s;
if (*s == 0) break;
// trim excess whitespace
- while (*s && isspace(*s)) {
- s++;
- }
+ for (; *s && isascii(*s) && !isalnum(*s); s++);
if (*s == 0) break;
- *d++ = ' ';
+ *d = ' ';
}
*d = 0;
}
--
2.33.7