ObjFW  Diff

Differences From Artifact [eb19be5b1d]:

To Artifact [51267778f5]:


148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString*)path
{
	@try {
		OFFile *file = [[OFFile alloc] initWithPath: path
						       mode: @"rb"];
		off_t size = [OFFile sizeOfFileAtPath: path];

		if (size > SIZE_MAX)
			@throw [OFOutOfRangeException exception];

		self = [self initWithItemSize: 1
				     capacity: (size_t)size];








|







148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString*)path
{
	@try {
		OFFile *file = [[OFFile alloc] initWithPath: path
						       mode: @"rb"];
		of_offset_t size = [OFFile sizeOfFileAtPath: path];

		if (size > SIZE_MAX)
			@throw [OFOutOfRangeException exception];

		self = [self initWithItemSize: 1
				     capacity: (size_t)size];