Revision: 14043
          http://sourceforge.net/p/skim-app/code/14043
Author:   hofman
Date:     2024-02-13 10:42:38 +0000 (Tue, 13 Feb 2024)
Log Message:
-----------
create mutable copy, not mutable string

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

Modified: trunk/NSString_SKExtensions.m
===================================================================
--- trunk/NSString_SKExtensions.m       2024-02-13 00:14:04 UTC (rev 14042)
+++ trunk/NSString_SKExtensions.m       2024-02-13 10:42:38 UTC (rev 14043)
@@ -176,7 +176,7 @@
     CFStringInitInlineBuffer((__bridge CFStringRef)self, &inlineBuffer, 
CFRangeMake(0, length));
     UniChar ch;
     
-#define DELETE_CHARACTERS(n) 
do{if(NULL==theString){theString=CFStringCreateMutable(NULL, (__bridge 
CFStringRef)self);};CFStringDelete(theString, CFRangeMake(delIdx, n));} while(0)
+#define DELETE_CHARACTERS(n) 
do{if(NULL==theString){theString=CFStringCreateMutableCopy(NULL, 0, (__bridge 
CFStringRef)self);};CFStringDelete(theString, CFRangeMake(delIdx, n));} while(0)
         
     // idx is current index into the inline buffer, and delIdx is current 
index in the mutable string
     CFIndex idx = 0, delIdx = 0;

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



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to