Týndur/LostIO — Änderungen 1858 → 1859

Zeile 191: Zeile 191:
 
     }
 
     }
  
−
     //Startsektor berechnen
+
     //...
−
    dword sector_start = filehandle->pos / 512;
 
−
    if(filehandle->pos % 512 != 0)
 
−
    {
 
−
        sector_start++;
 
−
    }
 
−
 
 
−
    //Sektorenanzahl berechnen
 
−
    dword sector_count = size / 512;
 
−
    if(size % 512 != 0)
 
−
    {
 
−
        sector_count++;
 
−
    }
 
  
 
     //Buffer allokieren
 
     //Buffer allokieren
 
     static byte* buffer = NULL;
 
     static byte* buffer = NULL;
 
     buffer = realloc(buffer, sector_count * 512);
 
     buffer = realloc(buffer, sector_count * 512);
−
 
  
 
     int i;
 
     int i;
Zeile 243: Zeile 230:
 
     }
 
     }
  
−
     //Startsektor berechnen
+
     //...
−
    dword sector_start = filehandle->pos / 512;
 
−
 
 
−
    //Sektorenanzahl berechnen
 
−
    dword sector_count = size / 512;
 
−
    if(size % 512 != 0)
 
−
    {
 
−
        sector_count++;
 
−
    }
 
−
 
 
  
 
     int i;
 
     int i;