ObjFW  Diff

Differences From Artifact [a5af572702]:

To Artifact [5552cd8f9b]:


531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546

	newCStringLength = s->cStringLength - (end - start) +
	    [replacement UTF8StringLength];
	s->hashed = NO;
	s->cString = [self resizeMemory: s->cString
				 toSize: newCStringLength + 1];

	memmove(s->cString + end, s->cString + start +
	    [replacement UTF8StringLength], s->cStringLength - end);
	memcpy(s->cString + start, [replacement UTF8String],
	    [replacement UTF8StringLength]);
	s->cString[newCStringLength] = '\0';

	s->cStringLength = newCStringLength;
	s->length = newLength;
}







|
|







531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546

	newCStringLength = s->cStringLength - (end - start) +
	    [replacement UTF8StringLength];
	s->hashed = NO;
	s->cString = [self resizeMemory: s->cString
				 toSize: newCStringLength + 1];

	memmove(s->cString + start + [replacement UTF8StringLength],
	    s->cString + end, s->cStringLength - end);
	memcpy(s->cString + start, [replacement UTF8String],
	    [replacement UTF8StringLength]);
	s->cString[newCStringLength] = '\0';

	s->cStringLength = newCStringLength;
	s->length = newLength;
}