Skip to content

Commit 731a152

Browse files
authoredMay 15, 2017
Merge pull request #69 from cs50/allocations-fix
Allocations fix
2 parents e0cfe98 + ca23eeb commit 731a152

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DESCRIPTION = CS50 Library for C
2525
MAINTAINER = CS50 <sysadmins@cs50.harvard.edu>
2626
NAME = libcs50
2727
OLD_NAMES = lib50-c library50-c
28-
VERSION = 7.2.1
28+
VERSION = 7.2.2
2929

3030
.PHONY: bash
3131
bash:

‎src/cs50.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static string *strings = NULL;
277277
string get_string(void)
278278
{
279279
// check whether we have room for another string
280-
if (allocations == SIZE_MAX)
280+
if (allocations * sizeof(string) == SIZE_MAX)
281281
{
282282
return NULL;
283283
}

0 commit comments

Comments
 (0)
Please sign in to comment.