diff options
Diffstat (limited to 'src/AsciiSrc.c')
-rw-r--r-- | src/AsciiSrc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c index ff7b9df..cdc6277 100644 --- a/src/AsciiSrc.c +++ b/src/AsciiSrc.c @@ -1032,7 +1032,7 @@ InitStringOrFile(AsciiSrcObject src, Boolean newString) if (!src->ascii_src.is_tempfile) { if ((file = fopen(src->ascii_src.string, open_mode)) != 0) { - (void) fseek(file, 0, 2); + (void) fseek(file, 0, SEEK_END); src->ascii_src.length = (XawTextPosition) ftell(file); return file; } else { @@ -1062,7 +1062,7 @@ LoadPieces(AsciiSrcObject src, FILE * file, char * string) local_str = XtMalloc((unsigned) (src->ascii_src.length + 1) * sizeof(unsigned char)); if (src->ascii_src.length != 0) { - fseek(file, 0, 0); + fseek(file, 0, SEEK_SET); src->ascii_src.length = fread(local_str, sizeof(unsigned char), (size_t)src->ascii_src.length, file); if (src->ascii_src.length <= 0) |