change, sprint_hex no long has an extra space in the end. This will break some output designs 😄

This commit is contained in:
iceman1001 2020-04-03 08:35:32 +02:00
commit 1b6164be07
2 changed files with 7 additions and 3 deletions

View file

@ -80,10 +80,11 @@ int searchHomeFilePath(char **foundpath, const char *filename, bool create_home)
if ((result != 0) && create_home) { if ((result != 0) && create_home) {
#ifdef _WIN32 #ifdef _WIN32
if (_mkdir(path)) { if (_mkdir(path))
#else #else
if (mkdir(path, 0700)) { if (mkdir(path, 0700))
#endif #endif
{
fprintf(stderr, "Could not create user directory %s\n", path); fprintf(stderr, "Could not create user directory %s\n", path);
free(path); free(path);
return PM3_EFILE; return PM3_EFILE;

View file

@ -211,6 +211,9 @@ void hex_to_buffer(const uint8_t *buf, const uint8_t *hex_data, const size_t hex
for (; i < minStrLen; i++, tmp += 1) for (; i < minStrLen; i++, tmp += 1)
sprintf(tmp, " "); sprintf(tmp, " ");
// remove last space
--tmp;
*tmp = '\0';
return; return;
} }