1
mirror of https://github.com/hashcat/hashcat synced 2025-03-08 09:19:18 +01:00

Fixed typo and some comments

This commit is contained in:
b0lek 2021-12-12 14:43:16 +01:00 committed by GitHub
parent b6e5c7427b
commit 33db7a06e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -119,7 +119,7 @@ void get_next_word_lm_gen (char *buf, u64 sz, u64 *len, u64 *off, u64 cutlen)
if ((i > 0) && (buf[i - 1] == '\r')) i--; if ((i > 0) && (buf[i - 1] == '\r')) i--;
if (i < cutlen + 1) *len = i; if (i < cutlen + 1) *len = i;
return; return;
} }
@ -145,7 +145,7 @@ void get_next_word_lm_hex_or_text (char *buf, u64 sz, u64 *len, u64 *off)
if (hex && (buf[3] != 'X')) hex = false; if (hex && (buf[3] != 'X')) hex = false;
if (hex && (buf[4] != '[')) hex = false; if (hex && (buf[4] != '[')) hex = false;
if (hex){ if (hex){
char *ptr = buf+5; char *ptr = buf+5; // starting after '['
for (u64 i = 5; i < sz; i++, ptr++) for (u64 i = 5; i < sz; i++, ptr++)
{ {
if (*ptr == ']') if (*ptr == ']')
@ -160,7 +160,7 @@ void get_next_word_lm_hex_or_text (char *buf, u64 sz, u64 *len, u64 *off)
hex = false; hex = false;
break; break;
} }
// upcase character if it is as letter // upcase character if it is a letter 'a-z'
if ((i & 1) == 1) // if first hex-char if ((i & 1) == 1) // if first hex-char
{ {
if (is_valid_hex_char(buf[i+1])){ if (is_valid_hex_char(buf[i+1])){