Skip to content

Commit

Permalink
Incorrect arguments order has been fixed. (Thanks to Fred Steinhaeuser)
Browse files Browse the repository at this point in the history
  • Loading branch information
fukuchi committed Apr 21, 2012
1 parent baac80a commit 2c50ac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qrencode.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ __STATIC QRRawCode *QRraw_new(QRinput *input)
}

raw->blocks = QRspec_rsBlockNum(spec);
raw->rsblock = (RSblock *)calloc(sizeof(RSblock), raw->blocks);
raw->rsblock = (RSblock *)calloc(raw->blocks, sizeof(RSblock));
if(raw->rsblock == NULL) {
QRraw_free(raw);
return NULL;
Expand Down Expand Up @@ -232,7 +232,7 @@ __STATIC MQRRawCode *MQRraw_new(QRinput *input)
return NULL;
}

raw->rsblock = (RSblock *)calloc(sizeof(RSblock), 1);
raw->rsblock = (RSblock *)calloc(1, sizeof(RSblock));
if(raw->rsblock == NULL) {
MQRraw_free(raw);
return NULL;
Expand Down

0 comments on commit 2c50ac3

Please sign in to comment.