Revision: 25155
          http://sourceforge.net/p/bibdesk/svn/25155
Author:   hofman
Date:     2020-12-07 14:54:42 +0000 (Mon, 07 Dec 2020)
Log Message:
-----------
We should first check the start and end of generated string before checking the 
length of the extra characters

Modified Paths:
--------------
    trunk/bibdesk/BDSKFormatParser.m

Modified: trunk/bibdesk/BDSKFormatParser.m
===================================================================
--- trunk/bibdesk/BDSKFormatParser.m    2020-12-07 10:16:44 UTC (rev 25154)
+++ trunk/bibdesk/BDSKFormatParser.m    2020-12-07 14:54:42 UTC (rev 25155)
@@ -912,8 +912,6 @@
     
     suggestionLength -= startLength + endLength;
     
-    if (number == 0 && suggestionLength == 0)
-        return YES;
     if (number > 0 && suggestionLength != number)
         return NO;
     if (startLength > 0 && [suggestion hasPrefix:baseStr] == NO)
@@ -920,6 +918,8 @@
         return NO;
     if (endLength > 0 && [suggestion hasSuffix:endStr] == NO)
         return NO;
+    if (number == 0 && suggestionLength == 0)
+        return YES;
     
     NSString *suggestedUnique = [suggestion 
substringWithRange:NSMakeRange(startLength, suggestionLength)];
     NSUInteger prefixLength = [prefix length];

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



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to