BUG: don't try to fix things that ain't broken.. or not. My try for a fix ended up making the PrintAndLog function stop working. Just by calling a fclose.. fixed.

This commit is contained in:
iceman1001
2014-11-27 22:16:17 +01:00
parent 95e635947b
commit 06b58a94f0
5 changed files with 35 additions and 46 deletions

View File

@@ -196,7 +196,7 @@ retest:
*/
int CmdEM410xSim(const char *Cmd)
{
int i, n, j, h, binary[4], parity[4];
int i, n, j, binary[4], parity[4];
char cmdp = param_getchar(Cmd, 0);
uint8_t uid[5] = {0x00};
@@ -222,9 +222,6 @@ int CmdEM410xSim(const char *Cmd)
/* clear our graph */
ClearGraph(0);
/* write it out a few times */
//for (h = 0; h < 4; h++)
//{
/* write 9 start bits */
for (i = 0; i < 9; i++)
AppendGraph(0, clock, 1);
@@ -260,11 +257,9 @@ int CmdEM410xSim(const char *Cmd)
AppendGraph(0, clock, parity[2]);
AppendGraph(0, clock, parity[3]);
/* stop bit */
AppendGraph(0, clock, 0);
//}
/* modulate that biatch */
/* stop bit */
AppendGraph(0, clock, 0);
//CmdManchesterMod("64");
/* booyah! */

View File

@@ -268,8 +268,8 @@ static int l_crc16(lua_State *L)
{
size_t size;
const char *p_str = luaL_checklstring(L, 1, &size);
unsigned short retval = crc16_ccitt( p_str, size);
uint16_t retval = crc16_ccitt( (uint8_t*) p_str, size);
lua_pushinteger(L, (int) retval);
return 1;
}

View File

@@ -79,7 +79,6 @@ void PrintAndLog(char *fmt, ...)
vfprintf(logfile, fmt, argptr2);
fprintf(logfile,"\n");
fflush(logfile);
fclose(logfile); // ICEMAN, this logfile is never closed?!?
}
va_end(argptr2);