Skip to content
Snippets Groups Projects
Commit 98de1f50 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

minor bugfix

Rev: src/modules/Image/encodings/hrz.c:1.3
Rev: src/modules/Image/encodings/pcx.c:1.7
parent f5e1e642
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
#include <ctype.h>
#include "stralloc.h"
RCSID("$Id: hrz.c,v 1.2 1999/05/23 17:46:53 mirar Exp $");
RCSID("$Id: hrz.c,v 1.3 1999/05/24 12:53:57 mirar Exp $");
#include "pike_macros.h"
#include "object.h"
#include "constants.h"
......@@ -58,8 +58,8 @@ void image_hrz_f_decode(INT32 args)
{
rgb_group pix;
pix.r = s->str[c*3]<<2 | s->str[c*3]>>4;
pix.g = s->str[c*3+1]<<2 | s->str[c*3]>>4;
pix.b = s->str[c*3+2]<<2 | s->str[c*3]>>4;
pix.g = s->str[c*3+1]<<2 | s->str[c*3+1]>>4;
pix.b = s->str[c*3+2]<<2 | s->str[c*3+2]>>4;
((struct image *)io->storage)->img[c] = pix;
}
pop_n_elems(args);
......
#include "global.h"
RCSID("$Id: pcx.c,v 1.6 1999/05/23 17:46:55 mirar Exp $");
RCSID("$Id: pcx.c,v 1.7 1999/05/24 12:53:58 mirar Exp $");
#include "config.h"
......@@ -70,7 +70,7 @@ unsigned char *get_chunk( struct buffer *b, unsigned int len )
unsigned char get_char( struct buffer *b )
{
if(b->len > 1)
if(b->len)
{
b->str++;
b->len--;
......@@ -402,8 +402,11 @@ static void f_rle_encode( INT32 args )
string_builder_putchar( &result, value );
}
}
/* fprintf(stderr, "RLE encode source len = %d; dest len = %d\n", */
/* sp[-1].u.string->len, result.s->len ); */
#if 0
fprintf(stderr, "read: %d\n", source-(unsigned char*)data->str);
fprintf(stderr, "RLE encode source len = %d; dest len = %d\n",
sp[-1].u.string->len, result.s->len );
#endif
pop_n_elems( args );
push_string( finish_string_builder( &result ));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment