diff options
| author | Max Roncace <me@caseif.net> | 2026-03-18 01:38:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-17 22:38:05 -0700 |
| commit | 6694c1b281a142972fce587bd20cd82ee65ab38f (patch) | |
| tree | 2537d09d5ab3d270eaca5143a4f2f2f65f4ecb49 /src/d/actor/d_a_npc_ks.cpp | |
| parent | 9f340b604b5ac3d19d330b7bd6a2d7355c58bc27 (diff) | |
Fix a bunch of compiler warnings and document several more bugs (#3130)
Diffstat (limited to 'src/d/actor/d_a_npc_ks.cpp')
| -rw-r--r-- | src/d/actor/d_a_npc_ks.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp index 8b0abd9fb7..e2b312a22a 100644 --- a/src/d/actor/d_a_npc_ks.cpp +++ b/src/d/actor/d_a_npc_ks.cpp @@ -250,7 +250,13 @@ static int daNpc_Ks_Draw(npc_ks_class* i_this) { fopAc_ac_c* actor = &i_this->actor; J3DModel* model = i_this->model->getModel(); + // This happens to work with MWCC since the member will only ever be initialized a pointer to a + // string in this TU's .data section, but comparing against a string literal is still UB. +#if AVOID_UB + if (strcmp(i_this->res_name, "Npc_kst") == 0) { +#else if (i_this->res_name == "Npc_kst") { +#endif g_env_light.settingTevStruct(4, &actor->current.pos, &actor->tevStr); } else { g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr); |
