mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
uip_init() does not set uip_conn, and httpd_init() runs right after it, so the assignment went through a pointer nothing had assigned yet. It has stayed invisible because the startup code does clear xdata: uip_conn is NULL rather than garbage, appstate sits 28 bytes into struct uip_conn, and the byte therefore lands at xdata 0x1C. With the current map that is inside the command line buffer, at an offset nothing reads while the line is empty, and cmd_editor_init() runs later anyway. Nothing is broken today, but it is a write to an address that has nothing to do with the state being set, and it moves the moment the struct grows or the map shifts. Address the connection directly.