Permalink
Browse files

qrduimo fixed for larger strings - initeccsize now has unsigned inste…

…ad of uchar.
1 parent e10bdef commit 4799414417e8edd31f712d88c1adcef4c6abab24 tz committed Feb 27, 2010
Showing with 4 additions and 3 deletions.
  1. +2 −1 qrduino.c
  2. +1 −1 qrencode.h
  3. +1 −1 qrframe.c
View
@@ -42,7 +42,8 @@ int main(int argc, char *argv[])
if( argc > 1 )
c = argv[1];
- initeccsize( 1, strlen(c));
+ k = initeccsize( 1, strlen(c));
+ fprintf( stderr, "%d bytes %d\n'", strlen(c), k );
initframe();
strcpy((char *)strinbuf, c );
qrencode();
View
@@ -17,7 +17,7 @@ void initframe(void);
// free the basic frame malloced structures
void freeframe(void);
// these resturn maximum string size to send in
-unsigned initeccsize(unsigned char ecc, unsigned char size);
+unsigned initeccsize(unsigned char ecc, unsigned size);
unsigned initecc(unsigned char level,unsigned char version);
#else // precalc-ed arrays
extern unsigned char strinbuf[];
View
@@ -245,7 +245,7 @@ unsigned initecc(unsigned char ecc, unsigned char vers)
return datablkw * (neccblk1 + neccblk2) + neccblk2 - 3; //-2 if vers <= 9!
}
-unsigned initeccsize(unsigned char ecc, unsigned char size)
+unsigned initeccsize(unsigned char ecc, unsigned size)
{
unsigned eccindex;
unsigned char vers;

0 comments on commit 4799414

Please sign in to comment.