ObjFW  Diff

Differences From Artifact [4c3b80addf]:

To Artifact [329955234f]:


136
137
138
139
140
141
142

143
144
145



146

147

	@try {
		retCString = of_realloc(retCString, 1, i + 1);
	} @catch (OFOutOfMemoryException *e) {
		/* We don't care if it fails, as we only made it smaller. */
	}


	return [OFString stringWithUTF8StringNoCopy: retCString
					     length: i
				       freeWhenDone: true];



}

@end







>
|
|
|
>
>
>
|
>

136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

	@try {
		retCString = of_realloc(retCString, 1, i + 1);
	} @catch (OFOutOfMemoryException *e) {
		/* We don't care if it fails, as we only made it smaller. */
	}

	@try {
		return [OFString stringWithUTF8StringNoCopy: retCString
						     length: i
					       freeWhenDone: true];
	} @catch (id e) {
		free(retCString);
		@throw e;
	}
}
@end