Skip to content

Commit

Permalink
#define for qr code content size
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Mar 13, 2023
1 parent 23e8fda commit 03f9ae6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/flipbip_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const char* TEXT_QRFILE = "Filetype: QRCode\n"
#define FILE_KLEN 256
#define FILE_SLEN 512
#define FILE_MAX_PATH_LEN 48
#define FILE_MAX_QRFILE_CONTENT 90
const char* FILE_HSTR = "fb01";
const char* FILE_K1 = "fb0131d5cf688221c109163908ebe51debb46227c6cc8b37641910833222772a"
"baefe6d9ceb651842260e0d1e05e3b90d15e7d5ffaaabc0207bf200a117793a2";
Expand Down Expand Up @@ -178,7 +179,7 @@ bool flipbip_save_qrfile(
const char* qr_msg_prefix,
const char* qr_msg_content,
const char* file_name) {
char qr_buf[90] = {0};
char qr_buf[FILE_MAX_QRFILE_CONTENT] = {0};
strcpy(qr_buf, TEXT_QRFILE);
strcpy(qr_buf + strlen(qr_buf), qr_msg_prefix);
strcpy(qr_buf + strlen(qr_buf), qr_msg_content);
Expand Down

0 comments on commit 03f9ae6

Please sign in to comment.