]> git.llucax.com Git - z.facultad/75.06/emufs.git/blobdiff - emufs/fsc.c
* Ahi la GUI carga bien y no se producen los problemas de memoria. Para resolverlo
[z.facultad/75.06/emufs.git] / emufs / fsc.c
index 0a5ba229cbfaefbc4f5726524d188c72f52130e9..692d6d1799d8a29d86846d2adff2008193894b0c 100644 (file)
@@ -101,9 +101,9 @@ int emufs_fsc_buscar_lugar(EMUFS *emu, unsigned long tam, int *fs)
        *fs = emu->tam_bloque;
        while( !feof(f_fsc) ){
                if (fread(&reg,sizeof(EMUFS_FSC),1,f_fsc) != 1) continue;
        *fs = emu->tam_bloque;
        while( !feof(f_fsc) ){
                if (fread(&reg,sizeof(EMUFS_FSC),1,f_fsc) != 1) continue;
-               if ( reg.free_space >= tam+sizeof(int)) 
+               if (reg.free_space >= tam) {
                        break;
                        break;
-               else {
+               else {
                        reg.block = -1;
                        *fs = emu->tam_bloque;
                }
                        reg.block = -1;
                        *fs = emu->tam_bloque;
                }
@@ -135,3 +135,4 @@ int emufs_fsc_get_fs(EMUFS *emu, int num_bloque)
        fclose(f_fsc);
        return reg.free_space;
 }
        fclose(f_fsc);
        return reg.free_space;
 }
+