]> Chaos Git - misc/MaihanaTL.git/commitdiff
Add insert for simple 1D command.
authorchaoskagami <chaos.kagami@gmail.com>
Sat, 25 Apr 2015 02:33:46 +0000 (22:33 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Sat, 25 Apr 2015 02:33:46 +0000 (22:33 -0400)
tools/scetool [new file with mode: 0755]
tools/src/scetool.c

diff --git a/tools/scetool b/tools/scetool
new file mode 100755 (executable)
index 0000000..59f8363
Binary files /dev/null and b/tools/scetool differ
index 98d758e7bee1d38d468b8e1b7a2376e5d27ea84f..d680e2f7dd4b4bbe393060baf9f4b26bcfbe8c58 100644 (file)
@@ -310,12 +310,14 @@ void extract (char* out) {
                                        free(c2);
 
                                        i += sizeof(block_help_2a) - 1;
-                               } else {
+                               } else if (c1->pre.Magic == 0x40) {
+                                       // One character block.
                                        fprintf(export, " 02 *%s]\n%s\n",               vol2char(c1->charA.VolName),
                                                                                                c1->text.TextData);
 
                                        i += sizeof(block_1char_2a) - 1;
                                }
+                               // Otherwise, IDK. Ignore it.
                        }
 
                        free(c1);
@@ -356,12 +358,13 @@ void extract (char* out) {
                                        free(c2);
 
                                        i += sizeof(block_help_28) - 1;
-                               } else {
+                               } else if (c1->pre.Magic == 0x40) {
                                        fprintf(export, " 02 *%s]\n%s\n",               vol2char(c1->charA.VolName),
                                                                                                c1->text.TextData);
 
                                        i += sizeof(block_1char_28) - 1;
                                }
+                               // Otherwise, IDK. Ignore it.
                        }
 
                        free(c1);
@@ -375,6 +378,7 @@ void extract (char* out) {
 
                        i += sizeof(text_ent) - 1;
                }
+               // Anything not caught shouldn't be, unless I RE'd wrong.
        }
 
        fflush(export);