Bug fix
This commit is contained in:
parent
b827f045b1
commit
8480dd070c
@ -27,7 +27,7 @@ function println($data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function printcode39($data) {
|
function printcode39($data) {
|
||||||
if (rawlen($data) and rawlen($data)<8) {
|
if (rawlen($data) and strlen($data)<8) {
|
||||||
$lp=fopen(PORT, 'w');
|
$lp=fopen(PORT, 'w');
|
||||||
fwrite($lp, "\x1dh\x50");
|
fwrite($lp, "\x1dh\x50");
|
||||||
fwrite($lp, "\x1dH\x02");
|
fwrite($lp, "\x1dH\x02");
|
||||||
@ -43,7 +43,7 @@ function printcode39($data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function printcode128($data) {
|
function printcode128($data) {
|
||||||
if (rawlen($data)) {
|
if (rawlen($data) and strlen($data)<9) {
|
||||||
$lp=fopen(PORT, 'w');
|
$lp=fopen(PORT, 'w');
|
||||||
fwrite($lp, "\x1dh\x50");
|
fwrite($lp, "\x1dh\x50");
|
||||||
fwrite($lp, "\x1dH\x02");
|
fwrite($lp, "\x1dH\x02");
|
||||||
@ -59,7 +59,7 @@ function printcode128($data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function printean13($data) {
|
function printean13($data) {
|
||||||
if (rawlen($data) and (rawlen($data) == 12 or rawlen($data) == 13)) {
|
if (rawlen($data) and (strlen($data) == 12 or strlen($data) == 13)) {
|
||||||
$lp=fopen(PORT, 'w');
|
$lp=fopen(PORT, 'w');
|
||||||
fwrite($lp, "\x1dh\x50");
|
fwrite($lp, "\x1dh\x50");
|
||||||
fwrite($lp, "\x1dH\x02");
|
fwrite($lp, "\x1dH\x02");
|
||||||
@ -75,7 +75,7 @@ function printean13($data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function printean8($data) {
|
function printean8($data) {
|
||||||
if (rawlen($data) and (rawlen($data) == 7 or rawlen($data) == 8)) {
|
if (rawlen($data) and (strlen($data) == 7 or strlen($data) == 8)) {
|
||||||
$lp=fopen(PORT, 'w');
|
$lp=fopen(PORT, 'w');
|
||||||
fwrite($lp, "\x1dh\x50");
|
fwrite($lp, "\x1dh\x50");
|
||||||
fwrite($lp, "\x1dH\x02");
|
fwrite($lp, "\x1dH\x02");
|
||||||
|
Loading…
Reference in New Issue
Block a user