Revision: 3111
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3111&view=rev
Author:   hofman
Date:     2007-10-31 06:30:18 -0700 (Wed, 31 Oct 2007)

Log Message:
-----------
Avoid infinite loop.

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

Modified: trunk/SKPSProgressController.m
===================================================================
--- trunk/SKPSProgressController.m      2007-10-31 13:13:54 UTC (rev 3110)
+++ trunk/SKPSProgressController.m      2007-10-31 13:30:18 UTC (rev 3111)
@@ -324,10 +324,11 @@
     NSAssert1(commandName == nil || [commandName isEqualToString:@"dvips"] || 
[commandName isEqualToString:@"dvipdf"] || [commandName 
isEqualToString:@"dvipdfm"] || [commandName isEqualToString:@"dvipdfmx"], @"DVI 
converter %@ is not supported", commandName);
     
     while ([fm isExecutableFileAtPath:commandPath] == NO) {
-        if (i < count)
-            commandPath = [[paths objectAtIndex:i++] 
stringByAppendingPathComponent:commandName];
-        else
+        if (i >= count) {
             commandPath = nil;
+            break;
+        }
+        commandPath = [[paths objectAtIndex:i++] 
stringByAppendingPathComponent:commandName];
     }
     
     NSString *tmpDir = SKUniqueDirectoryCreating(NSTemporaryDirectory(), YES);


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to