X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2Fvb_lib.c;fp=src%2Fgame_sp%2Fvb_lib.c;h=d32a62f85b9a8e2c359f79ebbba75e4267081f56;hp=c4df2cf3d853ce0493659bcec7a4623251287b6b;hb=0f5b7f63f2d3d75ba646795a3c1ea9fc4cee4845;hpb=1533b136c6f8d0656cc45ca4c204104ef3d75249 diff --git a/src/game_sp/vb_lib.c b/src/game_sp/vb_lib.c index c4df2cf3..d32a62f8 100644 --- a/src/game_sp/vb_lib.c +++ b/src/game_sp/vb_lib.c @@ -59,12 +59,12 @@ boolean STRING_IS_LIKE(char *a, char *b) } -void FILE_GET(FILE *a, int b, void *c, int d) +void FILE_GET(FILE *file, int offset, void *buffer, int num_bytes) { - fseek(a, b, SEEK_SET); + fseek(file, offset - 1, SEEK_SET); - while (d--) - *(byte *)c++ = fgetc(a); + while (num_bytes--) + *(byte *)buffer++ = fgetc(file); } int FILE_PUT(FILE *a, int b, void *c, int d)