fix: unshadow

This commit is contained in:
iceman1001 2019-10-20 06:31:49 -04:00
commit 2f573ebfb3
2 changed files with 6 additions and 6 deletions

View file

@ -150,11 +150,11 @@ int CmdWiegandDecode(const char *Cmd) {
bool errors = false; bool errors = false;
char cmdp = 0; char cmdp = 0;
while (param_getchar(Cmd, cmdp) != 0x00 && !errors) { while (param_getchar(Cmd, cmdp) != 0x00 && !errors) {
uint32_t strlen = param_getlength(Cmd, cmdp); uint32_t slen = param_getlength(Cmd, cmdp);
strlen++; // null termin slen++; // null termin
if (strlen > 2) { if (slen > 2) {
char *s = calloc(strlen, sizeof(uint8_t)); char *s = calloc(slen, sizeof(uint8_t));
param_getstr(Cmd, cmdp, s, strlen); param_getstr(Cmd, cmdp, s, slen);
hexstring_to_u96(&top, &mid, &bot, s); hexstring_to_u96(&top, &mid, &bot, s);
free(s); free(s);
gothex = true; gothex = true;

View file

@ -1,4 +1,4 @@
://----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Copyright (C) 2018 Merlok // Copyright (C) 2018 Merlok
// //
// This code is licensed to you under the terms of the GNU GPL, version 2 or, // This code is licensed to you under the terms of the GNU GPL, version 2 or,