mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Fix
This commit is contained in:
parent
a65fd10267
commit
1286fe322d
2 changed files with 6 additions and 7 deletions
|
@ -116,7 +116,7 @@ U0 HandleControlCodes(U8 ch) {
|
|||
SysLog("case 127");
|
||||
}
|
||||
if (ch == 0x24) {
|
||||
DocPrint(term.doc, "$$");
|
||||
DocPrint(term.doc, "$$$$");
|
||||
}
|
||||
if (ch >= 32 && ch < 256) // ZealOS's ASCII is up to 255
|
||||
{
|
||||
|
@ -670,18 +670,16 @@ U0 Telnet(U8 *host=NULL, U16 port=TELNET_PORT) {
|
|||
show_splash:
|
||||
// SplashScreen
|
||||
DocClear;
|
||||
MemSet(term.buffer, 0, sizeof(term.buffer));
|
||||
// Load the file into the buffer and get its size
|
||||
term.buffer_len = ANSIArtLoad(art_path, term.buffer);
|
||||
|
||||
if (term.buffer_len > 0) {
|
||||
term.buffer[term.buffer_len] = '\0';
|
||||
// parse the buffer
|
||||
ANSIParse;
|
||||
}
|
||||
else {
|
||||
"Error: Could not load splash screen.\n";
|
||||
Print("Error: Could not load splash screen.\n");
|
||||
}
|
||||
|
||||
|
||||
init_connection:
|
||||
while (!term.waiting_for_input || host != NULL)
|
||||
|
|
|
@ -36,7 +36,7 @@ I64 ANSIArtLoad(U8 *filename, U8 *buffer) {
|
|||
I64 full_blocks = file->de.size / BLK_SIZE;
|
||||
I64 remaining_bytes = file->de.size % BLK_SIZE;
|
||||
|
||||
SysLog("File size: %d, Number of full blocks: %d, Remaining bytes: %d\n", file->de.size, full_blocks, remaining_bytes);
|
||||
// SysLog("File size: %d, Number of full blocks: %d, Remaining bytes: %d\n", file->de.size, full_blocks, remaining_bytes);
|
||||
|
||||
// Read the full blocks into the buffer
|
||||
I64 i, blocks_read = 0;
|
||||
|
@ -54,6 +54,7 @@ I64 ANSIArtLoad(U8 *filename, U8 *buffer) {
|
|||
}
|
||||
}
|
||||
|
||||
I64 file_size = file->de.size;
|
||||
FClose(file);
|
||||
|
||||
if (blocks_read != (full_blocks + (remaining_bytes != 0))) {
|
||||
|
@ -61,7 +62,7 @@ I64 ANSIArtLoad(U8 *filename, U8 *buffer) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
return file->de.size; // Return the number of bytes read
|
||||
return file_size; // Return the number of bytes read
|
||||
}
|
||||
|
||||
public I64 ANSIArtBrowser()
|
||||
|
|
Loading…
Reference in a new issue