mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
flash: fix & simplify post-logo filling
This commit is contained in:
parent
67ebe71f58
commit
957db7cb53
1 changed files with 7 additions and 6 deletions
|
@ -635,11 +635,7 @@ static const char ice[] =
|
|||
"...................................................................\n @@@ @@@@@@@ @@@@@@@@ @@@@@@@@@@ @@@@@@ @@@ @@@\n"
|
||||
" @@! !@@ @@! @@! @@! @@! @@! @@@ @@!@!@@@\n !!@ !@! @!!!:! @!! !!@ @!@ @!@!@!@! @!@@!!@!\n"
|
||||
" !!: :!! !!: !!: !!: !!: !!! !!: !!!\n : :: :: : : :: ::: : : : : : :: : \n"
|
||||
_RED_(" . .. .. . . .. ... . . . . . .. . ")
|
||||
"\n...................................................................\n"
|
||||
"...................................................................\n"
|
||||
"...................................................................\n"
|
||||
;
|
||||
_RED_(" . .. .. . . .. ... . . . . . .. . ");
|
||||
|
||||
// Write a file's segments to Flash
|
||||
int flash_write(flash_file_t *ctx) {
|
||||
|
@ -651,6 +647,7 @@ int flash_write(flash_file_t *ctx) {
|
|||
char ice3[sizeof(ice)] = {0};
|
||||
memcpy_filter_ansi(ice2, ice, sizeof(ice), !g_session.supports_colors);
|
||||
memcpy_filter_emoji(ice3, ice2, sizeof(ice2), g_session.emoji_mode);
|
||||
size_t ice3len = strlen(ice3);
|
||||
|
||||
for (int i = 0; i < ctx->num_segs; i++) {
|
||||
flash_seg_t *seg = &ctx->segments[i];
|
||||
|
@ -679,10 +676,14 @@ int flash_write(flash_file_t *ctx) {
|
|||
baddr += block_size;
|
||||
length -= block_size;
|
||||
block++;
|
||||
if (len < strlen(ice3)) {
|
||||
if (len < ice3len) {
|
||||
fprintf(stdout, "%c", ice3[len++]);
|
||||
} else {
|
||||
if ((len - ice3len) % 67 == 0) {
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
fprintf(stdout, ".");
|
||||
len++;
|
||||
}
|
||||
fflush(stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue