Skip to content

Commit 72417d5

Browse files
committed
fixes #4 stack overflow by moving ~6KB FAT buffer from stack to heap
1 parent d0011d9 commit 72417d5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

recordbc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ void Record_Bad_Clusters(void)
4646
if (param.fat_type==FAT32) Record_Bad_Clusters_FAT32();
4747
}
4848

49+
static unsigned char fat12_fat[6145];
4950
void Record_Bad_Clusters_FAT12(void)
5051
{
5152
unsigned long bad_cluster;
5253
unsigned long last_bad_cluster;
53-
unsigned char fat12_fat[6145];
54+
/* unsigned char fat12_fat[6145]; -- causes stack overflow with default Open Watcom build */
5455

5556
int index;
5657
int sector;

0 commit comments

Comments
 (0)