Blob Blame History Raw
From 53c9f0bcaf20203bb4ee56da760a6e5118e6f93b Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Date: Mon, 9 Nov 2015 19:18:48 +1100
Subject: [PATCH] src/common.c: Pull fix from 1.0.25

---
 src/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common.c b/src/common.c
index c6b88cc..830c43e 100644
--- a/src/common.c
+++ b/src/common.c
@@ -805,7 +805,7 @@ header_read (SF_PRIVATE *psf, void *ptr, int bytes)
 	if (psf->headindex + bytes > SIGNED_SIZEOF (psf->header))
 	{	int most ;
 
-		most = SIGNED_SIZEOF (psf->header) - psf->headindex ;
+		most = SIGNED_SIZEOF (psf->header) - psf->headend ;
 		psf_fread (psf->header + psf->headend, 1, most, psf) ;
 		memcpy (ptr, psf->header + psf->headend, most) ;
 		psf->headend = psf->headindex += most ;