dev #1

Merged
artemuhi merged 3 commits from dev into main 2024-05-01 10:38:27 +03:00
Showing only changes of commit 2cd1a94955 - Show all commits

View File

@ -93,7 +93,7 @@ function printean8($data) {
function rawdlen($data) { function rawdlen($data) {
$len = strlen($data); $len = strlen($data);
$l = ($len + 3) % 256; $l = ($len + 3) % 256;
$h = intdiv($len / 256); $h = intdiv($len, 256);
if ($l<16) { if ($l<16) {
$l=hex2bin("0" . dechex($l)); $l=hex2bin("0" . dechex($l));
} else { } else {
@ -106,7 +106,7 @@ function rawdlen($data) {
} }
return $l . $h; return $l . $h;
} }
function printqr($data, $size) { function printqr($data, $size = 16) {
if (strlen($data)<7088) { if (strlen($data)<7088) {
if ($size<16) { if ($size<16) {
$encs=hex2bin("0" . dechex($size)); $encs=hex2bin("0" . dechex($size));