diff --git a/src/win/win.c b/src/win/win.c index 1f6ab15af..8f4d5e937 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -60,7 +60,7 @@ #endif typedef struct { - WCHAR str[512]; + WCHAR str[1024]; } rc_str_t; @@ -165,50 +165,50 @@ LoadCommonStrings(void) free_string(&lpRCstr4096); free_string(&lpRCstr2048); - lpRCstr2048 = (rc_str_t *)malloc(STR_NUM_2048*sizeof(rc_str_t)); - lpRCstr4096 = (rc_str_t *)malloc(STR_NUM_4096*sizeof(rc_str_t)); - lpRCstr4352 = (rc_str_t *)malloc(STR_NUM_4352*sizeof(rc_str_t)); - lpRCstr4608 = (rc_str_t *)malloc(STR_NUM_4608*sizeof(rc_str_t)); - lpRCstr5120 = (rc_str_t *)malloc(STR_NUM_5120*sizeof(rc_str_t)); - lpRCstr5376 = (rc_str_t *)malloc(STR_NUM_5376*sizeof(rc_str_t)); - lpRCstr5632 = (rc_str_t *)malloc(STR_NUM_5632*sizeof(rc_str_t)); - lpRCstr5888 = (rc_str_t *)malloc(STR_NUM_5888*sizeof(rc_str_t)); - lpRCstr6144 = (rc_str_t *)malloc(STR_NUM_6144*sizeof(rc_str_t)); - lpRCstr7168 = (rc_str_t *)malloc(STR_NUM_7168*sizeof(rc_str_t)); + lpRCstr2048 = calloc(STR_NUM_2048, sizeof(rc_str_t)); + lpRCstr4096 = calloc(STR_NUM_4096, sizeof(rc_str_t)); + lpRCstr4352 = calloc(STR_NUM_4352, sizeof(rc_str_t)); + lpRCstr4608 = calloc(STR_NUM_4608, sizeof(rc_str_t)); + lpRCstr5120 = calloc(STR_NUM_5120, sizeof(rc_str_t)); + lpRCstr5376 = calloc(STR_NUM_5376, sizeof(rc_str_t)); + lpRCstr5632 = calloc(STR_NUM_5632, sizeof(rc_str_t)); + lpRCstr5888 = calloc(STR_NUM_5888, sizeof(rc_str_t)); + lpRCstr6144 = calloc(STR_NUM_6144, sizeof(rc_str_t)); + lpRCstr7168 = calloc(STR_NUM_7168, sizeof(rc_str_t)); for (i=0; i 3)) - LoadString(hinstance, 5376+i, lpRCstr5376[i].str, 512); + LoadString(hinstance, 5376+i, lpRCstr5376[i].str, 1024); } for (i=0; i 3)) - LoadString(hinstance, 5632+i, lpRCstr5632[i].str, 512); + LoadString(hinstance, 5632+i, lpRCstr5632[i].str, 1024); } for (i=0; i