Skip to content

Commit 993fc6c

Browse files
committed
src/sd2.c: Fix a psf_binheader_writef usage bug
Unfortunately this bug cannot be found by the compiler and the tests didn't find it either. It was found during work to improve the type safety of calls to psf_binheader_writef.
1 parent e6d6816 commit 993fc6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sd2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
** Copyright (C) 2001-2016 Erik de Castro Lopo <[email protected]>
2+
** Copyright (C) 2001-2017 Erik de Castro Lopo <[email protected]>
33
** Copyright (C) 2004 Paavo Jumppanen
44
**
55
** This program is free software; you can redistribute it and/or modify
@@ -244,7 +244,7 @@ sd2_write_rsrc_fork (SF_PRIVATE *psf, int UNUSED (calc_length))
244244
psf_binheader_writef (psf, "Eo2mm", make_size_t (0x50), 0, Sd2f_MARKER, lsf1_MARKER) ;
245245

246246
/* Very start of resource map. */
247-
psf_binheader_writef (psf, "E444", make_size_t (rsrc.map_offset), rsrc.data_offset, rsrc.map_offset, rsrc.data_length) ;
247+
psf_binheader_writef (psf, "E4444", make_size_t (rsrc.map_offset), rsrc.data_offset, rsrc.map_offset, rsrc.data_length) ;
248248

249249
/* These I don't currently understand. */
250250
if (1)

0 commit comments

Comments
 (0)