From 97fa56a62cc7ffb067b58560b96d50b07685ce8a Mon Sep 17 00:00:00 2001
From: Per Hedbor <ph@opera.com>
Date: Tue, 17 Oct 2000 22:07:20 +0200
Subject: [PATCH] Fixed bug

Rev: src/modules/Image/encodings/xcf.c:1.25
---
 src/modules/Image/encodings/xcf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/Image/encodings/xcf.c b/src/modules/Image/encodings/xcf.c
index d4f7fdde8a..8de3a5f35b 100644
--- a/src/modules/Image/encodings/xcf.c
+++ b/src/modules/Image/encodings/xcf.c
@@ -1,5 +1,5 @@
 #include "global.h"
-RCSID("$Id: xcf.c,v 1.24 2000/10/10 20:50:54 grubba Exp $");
+RCSID("$Id: xcf.c,v 1.25 2000/10/17 20:07:20 per Exp $");
 
 #include "image_machine.h"
 
@@ -327,10 +327,10 @@ static struct buffer read_string( struct buffer *data )
 {
   struct buffer res = *data;
   res.len = xcf_read_int( data );
-  res.base_len = res.len;
-  res.base_offset = data->base_offset+(data->base_len-data->len);
+  res.base_offset = (data->base_offset+(data->base_len-data->len));
   res.str = (unsigned char *)read_data( data, res.len );
-  if(res.len > 0) res.len--; /* len includes ending \0 */
+  if(res.len > 0)  res.len--;  /* len includes ending \0 */
+  res.base_len = res.len;
   if(!res.str)
     error("String read failed\n");
   return res;
-- 
GitLab