Skip to content

Commit

Permalink
Update initialization.c
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperGY authored May 3, 2023
1 parent e292c07 commit 47b9622
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/termDisplay/initialization.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int initializeCharBuffer()

for (int i=0; i<TD_HEIGHT; i++)
{
TD_CHAR_BUFFER[i] = malloc(sizeof(char) * TD_WIDTH);
TD_CHAR_BUFFER[i] = (char *)malloc(sizeof(char) * TD_WIDTH);

if (!TD_CHAR_BUFFER[i]) // malloc failed
{
Expand Down Expand Up @@ -190,7 +190,7 @@ int initializeFGColorBuffer()

for (int i=0; i<TD_HEIGHT; i++)
{
TD_FG_COLOR_BUFFER[i] = malloc(sizeof(int) * TD_WIDTH);
TD_FG_COLOR_BUFFER[i] = (int *)malloc(sizeof(int) * TD_WIDTH);

if (!TD_FG_COLOR_BUFFER[i]) // malloc failed
{
Expand Down Expand Up @@ -237,7 +237,7 @@ int initializeBGColorBuffer()

for (int i=0; i<TD_HEIGHT; i++)
{
TD_BG_COLOR_BUFFER[i] = malloc(sizeof(int) * TD_WIDTH);
TD_BG_COLOR_BUFFER[i] = (int *)malloc(sizeof(int) * TD_WIDTH);

if (!TD_BG_COLOR_BUFFER[i]) // malloc failed
{
Expand Down Expand Up @@ -344,4 +344,4 @@ void terminatePrintBuffer()

free(TD_PRINT_BUFFER);
TD_PRINT_BUFFER = NULL;
}
}

0 comments on commit 47b9622

Please sign in to comment.