mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
Reduce some var scopes
This commit is contained in:
parent
ac6b0ec1ce
commit
732bc766f9
52 changed files with 318 additions and 409 deletions
|
@ -234,13 +234,13 @@ void memcpy_filter_ansi(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)
|
||||
if ((i < n - 1)
|
||||
&& (rsrc[i] == '\x1b')
|
||||
&& (rsrc[i + 1] >= 0x40)
|
||||
&& (rsrc[i + 1] <= 0x5F)) { // entering ANSI sequence
|
||||
|
||||
i++;
|
||||
if ((rsrc[i] == '[') && (i < n - 1)) { // entering CSI sequence
|
||||
if ((i < n - 1) && (rsrc[i] == '[')) { // entering CSI sequence
|
||||
i++;
|
||||
|
||||
while ((i < n - 1) && (rsrc[i] >= 0x30) && (rsrc[i] <= 0x3F)) { // parameter bytes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue