shithub: jbig2

Download patch

ref: 8d833614a9cdc49e405d72bbf1658859e4468df1
parent: 7adeea559e68d424dd78ce440536ac2d78fc2a8c
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Mon Dec 1 12:53:45 EST 2003

Correct a warning. Offset, then cast to non-const, not the other way around.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@292 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/jbig2_metadata.c
+++ b/jbig2_metadata.c
@@ -13,7 +13,7 @@
     Artifex Software, Inc.,  101 Lucas Valley Road #110,
     San Rafael, CA  94903, U.S.A., +1(415)492-9861.
 
-    $Id: jbig2_metadata.c,v 1.2 2003/03/05 03:32:41 giles Exp $
+    $Id$
 */
 
 #ifdef HAVE_CONFIG_H
@@ -99,8 +99,8 @@
 int jbig2_parse_comment_ascii(Jbig2Ctx *ctx, Jbig2Segment *segment,
                                const uint8_t *segment_data)
 {
-    char *s = (char *)segment_data + 4;
-    char *end = (char *)segment_data + segment->data_length;
+    char *s = (char *)(segment_data + 4);
+    char *end = (char *)(segment_data + segment->data_length);
     Jbig2Metadata *comment;
     char *key, *value;
     int key_length, value_length;