some malloc()

This commit is contained in:
nhmall
2026-05-11 11:33:15 -04:00
parent a5a4bc6b4a
commit b4f28edfe4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -2513,10 +2513,10 @@ void nethack_enter_consoletty(void)
/* setup front and back buffers */
int buffer_size_bytes = sizeof(cell_t) * console.buffer_size;
console.front_buffer = (cell_t *)malloc(buffer_size_bytes);
console.front_buffer = (cell_t *)alloc(buffer_size_bytes);
buffer_fill_to_end(console.front_buffer, &undefined_cell, 0, 0);
console.back_buffer = (cell_t *)malloc(buffer_size_bytes);
console.back_buffer = (cell_t *)alloc(buffer_size_bytes);
buffer_fill_to_end(console.back_buffer, &clear_cell, 0, 0);
/* determine whether OS version has unicode support */
+1 -1
View File
@@ -677,7 +677,7 @@ BOOL winos_font_support_cp437(HFONT hFont)
DWORD size = (size_t) GetFontUnicodeRanges(hdc, NULL);
if (size) {
GLYPHSET *glyphSet = (GLYPHSET *) malloc((size_t) size);
GLYPHSET *glyphSet = (GLYPHSET *) alloc((size_t) size);
if (glyphSet != NULL) {
#ifdef _MSC_VER
#pragma warning( push )