diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-11-04 15:27:13 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-11-04 15:27:13 +0100 |
commit | 6c0262c635414107f67ee204d32b2f2eb0c3570b (patch) | |
tree | ef869cefe9fd55c4f6ab31f73e081afeacb970f5 | |
parent | 4e34807a8cfd4e6e6314ec75a6e34646b89fad3f (diff) | |
download | NetworkManager-lr/qr-linux.tar.gz |
clients: draw border around qr code on linux consolelr/qr-linux
Scanners won't recognize it on black background otherwise.
-rw-r--r-- | clients/common/nm-client-utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clients/common/nm-client-utils.c b/clients/common/nm-client-utils.c index f63d3c7d30..4d356edbbe 100644 --- a/clients/common/nm-client-utils.c +++ b/clients/common/nm-client-utils.c @@ -561,9 +561,9 @@ nmc_print_qrcode (const char *str) if (term_linux) { /* G1 alternate character set on Linux console. */ - for (y = 0; y < size; y += 1) { + for (y = -1; y < size + 1; y += 1) { g_print (" \033[37;40;1m\016"); - for (x = 0; x < size; x++) { + for (x = -1; x < size + 1; x++) { g_print ( qrcodegen_getModule (qrcode, x, y) ? " " : "\060\060"); } |