summaryrefslogtreecommitdiffstats
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-30 21:20:29 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-30 21:20:29 +0000
commitc54b8a78fad3cf726bd554c32c1d154ce2ecd936 (patch)
treef553a7ab3d218d0793b4ecba791724b2952dc45c /src/gui_w32.c
parentf25fd51b89bb31e8adb9ad055ec0b617ee9d319e (diff)
updated for version 7.0152
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 6ff5fc6494..c5d1eb0091 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1971,7 +1971,9 @@ gui_mch_draw_string(
vim_free(padding);
pad_size = Columns;
- padding = (int *)alloc(pad_size * sizeof(int));
+ /* Don't give an out-of-memory message here, it would call us
+ * recursively. */
+ padding = (int *)lalloc(pad_size * sizeof(int), FALSE);
if (padding != NULL)
for (i = 0; i < pad_size; i++)
padding[i] = gui.char_width;
@@ -2007,10 +2009,10 @@ gui_mch_draw_string(
&& (unicodebuf == NULL || len > unibuflen))
{
vim_free(unicodebuf);
- unicodebuf = (WCHAR *)alloc(len * sizeof(WCHAR));
+ unicodebuf = (WCHAR *)lalloc(len * sizeof(WCHAR), FALSE);
vim_free(unicodepdy);
- unicodepdy = (int *)alloc(len * sizeof(int));
+ unicodepdy = (int *)lalloc(len * sizeof(int), FALSE);
unibuflen = len;
}
@@ -2730,12 +2732,12 @@ gui_mch_dialog(
dfltbutton = -1;
/* Allocate array to hold the width of each button */
- buttonWidths = (int *) lalloc(numButtons * sizeof(int), TRUE);
+ buttonWidths = (int *)lalloc(numButtons * sizeof(int), TRUE);
if (buttonWidths == NULL)
return -1;
/* Allocate array to hold the X position of each button */
- buttonPositions = (int *) lalloc(numButtons * sizeof(int), TRUE);
+ buttonPositions = (int *)lalloc(numButtons * sizeof(int), TRUE);
if (buttonPositions == NULL)
return -1;