ObjFW  Diff

Differences From Artifact [504b483064]:

To Artifact [365ef7f711]:


159
160
161
162
163
164
165

166




167
168
169
170
171
172
173
			case -1:
				c = [self class];
				[super free];
				@throw [OFInvalidEncodingException
				    newWithClass: c];
			}


			string = [self getMemWithSize: length + 1];




			memcpy(string, str, length + 1);
		}
	}

	return self;
}








>
|
>
>
>
>







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
			case -1:
				c = [self class];
				[super free];
				@throw [OFInvalidEncodingException
				    newWithClass: c];
			}

			@try {
				string = [self getMemWithSize: length + 1];
			} @catch (OFException *e) {
				[self free];
				@throw e;
			}
			memcpy(string, str, length + 1);
		}
	}

	return self;
}