mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-23 23:26:49 +03:00
ktcc:
- Fixed "segmentation fault" if it is not possible to write to file git-svn-id: svn://kolibrios.org@8716 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c080568a52
commit
86ba0f80f2
@ -260,7 +260,10 @@ int tcc_output_me(TCCState* s1,const char *filename)
|
||||
me.header.params= tcc_find_symbol_me(&me,"__argv"); // <--
|
||||
me.header.argv= tcc_find_symbol_me(&me,"__path"); // <--
|
||||
|
||||
f=fopen(filename,"wb");
|
||||
if((f=fopen(filename,"wb"))==NULL){
|
||||
tcc_error("could not create '%s': %s", filename, strerror(errno));
|
||||
}
|
||||
|
||||
for (i=0;i<8;i++)
|
||||
me.header.magic[i]=me_magic[i];
|
||||
fwrite(&me.header,1,sizeof(IMAGE_MEOS_FILE_HEADER),f);
|
||||
|
Loading…
Reference in New Issue
Block a user