mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-29 11:28:15 +00:00
Merge pull request #3771 from dcorpron-kl/master
Fixed stray comma in JSON output when selecting a device other than t…
This commit is contained in:
commit
a0d509b115
@ -1899,14 +1899,18 @@ void status_display_status_json (hashcat_ctx_t *hashcat_ctx)
|
|||||||
printf (" \"rejected\": %" PRIu64 ",", hashcat_status->progress_rejected);
|
printf (" \"rejected\": %" PRIu64 ",", hashcat_status->progress_rejected);
|
||||||
printf (" \"devices\": [");
|
printf (" \"devices\": [");
|
||||||
|
|
||||||
for (int device_id = 0; device_id < hashcat_status->device_info_cnt; device_id++)
|
for (int device_id = 0, first_dev = 1; device_id < hashcat_status->device_info_cnt; device_id++)
|
||||||
{
|
{
|
||||||
const device_info_t *device_info = hashcat_status->device_info_buf + device_id;
|
const device_info_t *device_info = hashcat_status->device_info_buf + device_id;
|
||||||
|
|
||||||
if (device_info->skipped_dev == true) continue;
|
if (device_info->skipped_dev == true) continue;
|
||||||
if (device_info->skipped_warning_dev == true) continue;
|
if (device_info->skipped_warning_dev == true) continue;
|
||||||
|
|
||||||
if (device_id != 0)
|
if (first_dev)
|
||||||
|
{
|
||||||
|
first_dev = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
printf (",");
|
printf (",");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user