mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
style
This commit is contained in:
parent
ab6870c573
commit
9779868753
9 changed files with 86 additions and 59 deletions
|
@ -241,23 +241,23 @@ static void memcpy_filtered(void *dest, const void *src, size_t n, bool filter)
|
|||
uint8_t *rsrc = (uint8_t *)src;
|
||||
uint16_t si = 0;
|
||||
for (uint16_t i = 0; i < n; i++) {
|
||||
if ( (rsrc[i] == '\x1b')
|
||||
&& (i < n - 1)
|
||||
&& (rsrc[i + 1] >= 0x40)
|
||||
&& (rsrc[i + 1] <= 0x5F) ) { // entering ANSI sequence
|
||||
|
||||
if ((rsrc[i] == '\x1b')
|
||||
&& (i < n - 1)
|
||||
&& (rsrc[i + 1] >= 0x40)
|
||||
&& (rsrc[i + 1] <= 0x5F)) { // entering ANSI sequence
|
||||
|
||||
i++;
|
||||
if ((rsrc[i] == '[') && (i < n - 1)) { // entering CSI sequence
|
||||
i++;
|
||||
|
||||
|
||||
while ((i < n - 1) && (rsrc[i] >= 0x30) && (rsrc[i] <= 0x3F)) { // parameter bytes
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
while ((i < n - 1) && (rsrc[i] >= 0x20) && (rsrc[i] <= 0x2F)) { // intermediate bytes
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
if ((rsrc[i] >= 0x40) && (rsrc[i] <= 0x7F)) { // final byte
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue