File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,6 +231,17 @@ int ParseKipConfiguration(const char *json, KipHeader *kip_hdr) {
231231 }
232232 }
233233
234+ /* Parse immortality. */
235+ /* This field is optional, and defaults to true (set before this function is called). */
236+ int immortal = 1 ;
237+ if (cJSON_GetBooleanOptional (npdm_json , "immortal" , & immortal )) {
238+ if (immortal ) {
239+ kip_hdr -> Flags |= 0x40 ;
240+ } else {
241+ kip_hdr -> Flags &= ~0x40 ;
242+ }
243+ }
244+
234245 /* Parse main_thread_stack_size. */
235246 u64 stack_size = 0 ;
236247 if (!cJSON_GetU64 (npdm_json , "main_thread_stack_size" , & stack_size )) {
@@ -553,7 +564,7 @@ int main(int argc, char* argv[]) {
553564
554565 KipHeader kip_hdr = {0 };
555566 memcpy (kip_hdr .Magic , "KIP1" , 4 );
556- kip_hdr .Flags = 0x3F ;
567+ kip_hdr .Flags = 0x7F ;
557568
558569 if (sizeof (KipHeader ) != 0x100 ) {
559570 fprintf (stderr , "Bad compile environment!\n" );
You can’t perform that action at this time.
0 commit comments