From patchwork Sat Sep 29 07:33:39 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Wieninger X-Patchwork-Id: 12528 Received: from mail.gmx.net ([213.165.64.20]) by www.linuxtv.org with smtp (Exim 4.63) (envelope-from ) id 1IbWqL-0002V0-OI for vdr@linuxtv.org; Sat, 29 Sep 2007 09:34:29 +0200 Received: (qmail invoked by alias); 29 Sep 2007 07:33:59 -0000 Received: from F57f0.f.strato-dslnet.de (EHLO [192.168.178.23]) [195.4.87.240] by mail.gmx.net (mp029) with SMTP; 29 Sep 2007 09:33:59 +0200 X-Authenticated: #2425893 X-Provags-ID: V01U2FsdGVkX19SpIAcMrpS1D8gSR3f2I/Z5SwNd1Bw+28j6z7roV 3LsaFO+bNJEzwq Message-ID: <46FDFFD3.5040505@gmx.de> Date: Sat, 29 Sep 2007 09:33:39 +0200 From: Christian Wieninger User-Agent: Icedove 1.5.0.12 (X11/20070730) MIME-Version: 1.0 To: vdr Mailinglist X-Y-GMX-Trusted: 0 Subject: [vdr] Crash with cMenuEditStrItem in vdr-1.5.9 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2007 07:34:29 -0000 Status: O X-Status: X-Keywords: X-UID: 14163 Hi, me and Rolf Ahrenberg noticed that there seems to be a problem with cMenuEditStrItem in vdr-1.5.9. To reproduce it just call the timer edit menu and hit 'left' on the directory item or any other cMenuEditStrItem object. The following patch should fix this: It happens here that pos is -1. Strange that the old code of previous vdr versions if (!insert && isalpha(value[pos])) uppercase = isupper(value[pos]); had no problem there. BR, Christian --- vdr-1.5.9/menuitems.c 2007-08-17 15:48:07.000000000 +0200 +++ VDR/menuitems.c 2007-09-29 09:02:12.000000000 +0200 @@ -500,7 +500,7 @@ pos--; newchar = true; } - if (!insert && Utf8is(alpha, valueUtf8[pos])) + if (pos >= 0 && !insert && Utf8is(alpha, valueUtf8[pos])) uppercase = Utf8is(upper, valueUtf8[pos]); break; case kRight|k_Repeat: