Skip to content

Commit

Permalink
fix: config typo and small memory fix in extnotes.c (#201)
Browse files Browse the repository at this point in the history
Co-authored-by: Snazzah <[email protected]>
  • Loading branch information
ANUKOOL324 and Snazzah authored Oct 3, 2024
1 parent a2abafd commit 81ba0f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/download/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
fontFamily: {
display: ['Lexend', '"Red Hat Text"', ...sans],
body: ['"Red Hat Text"', ...sans],
mono: ['"Ubunto Mono"', ...mono]
mono: ['"Ubuntu Mono"', ...mono]
}
},
variants: {},
Expand Down
9 changes: 6 additions & 3 deletions cook/extnotes.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ int main(int argc, char **argv)

// Get the data
if (packetSize > bufSz) {
buf = realloc(buf, packetSize);
if (!buf)
unsigned char *temp = realloc(buf, packetSize); // Use a temporary pointer
if (!temp) { // Check if memory allocation failed
free(buf); // Free the existing buffer to avoid a memory leak
break;
}
buf = temp; // Only assign buf if realloc was successful
bufSz = packetSize;
}
if (readAll(0, buf, packetSize) != packetSize)
Expand Down Expand Up @@ -185,7 +188,7 @@ int main(int argc, char **argv)
m = time / 60.0;
time -= m * 60;
printf("\t%d:%02d:%02d: ", h, m, (int) time);
printNote(buf, packetSize);
printNote(buf, packetSize);
printf("\r\n");
}
}
Expand Down

0 comments on commit 81ba0f4

Please sign in to comment.