Revision: 4987
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4987&view=rev
Author:   hofman
Date:     2008-11-23 18:31:38 +0000 (Sun, 23 Nov 2008)

Log Message:
-----------
assign after test to avoid crashing (just to be sure)

Modified Paths:
--------------
    trunk/NSData_SKExtensions.m

Modified: trunk/NSData_SKExtensions.m
===================================================================
--- trunk/NSData_SKExtensions.m 2008-11-23 17:49:17 UTC (rev 4986)
+++ trunk/NSData_SKExtensions.m 2008-11-23 18:31:38 UTC (rev 4987)
@@ -52,7 +52,7 @@
 
 - (unsigned)indexOfBytes:(const void *)patternBytes length:(unsigned 
int)patternLength options:(int)mask range:(NSRange)searchRange {
     unsigned const char *selfBufferStart, *selfPtr, *selfPtrEnd, *selfPtrMax;
-    unsigned const char firstPatternByte = *(const char *)patternBytes;
+    unsigned const char firstPatternByte;
     unsigned int selfLength;
     BOOL backward = (mask & NSBackwardsSearch) != 0;
     
@@ -67,6 +67,7 @@
         return NSNotFound;
     }
     
+    firstPatternByte = *(const char *)patternBytes;
     selfBufferStart = [self bytes];
     selfPtrMax = selfBufferStart + NSMaxRange(searchRange) + 1 - patternLength;
     if (backward) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to