some malloc()
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user