Bug in my mod exposed bug in DaggerfallItemMakerWindow

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

Bug in my mod exposed bug in DaggerfallItemMakerWindow

Post by DunnyOfPenwick »

I was doing more mod testing and came across another bug.

I have the spell effect mod set up to AllowedCraftingStations=ItemMaker, but I didn't override the GetEnchantmentSettings(), so when the DaggerfallItemMakerWindow code tries to get the enchantment settings, it gets a null.

Line 252 in DaggerfallItemMakerWindow.cs attempts to check for null, but uses a bitwise-or instead of a logical-or.
Furthermore, it just produces a log message and continues processing when it should 'continue;' the loop instead.

This unhandled null object error results in Utility.StartGameBehaviour.Update() being called, causing it to get caught in an infinite loop.

User avatar
pango
Posts: 3344
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Bug in my mod exposed bug in DaggerfallItemMakerWindow

Post by pango »

Yup, looks like a nasty typo.
Found a similar one in Questing/Clock.cs:149:

Code: Select all

                    if (ddhhmmGroup.Success || hhmmGroup.Success | mmGroup.Success)
I pushed a fix https://github.com/Interkarma/daggerfal ... f143fff46f
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7234
Joined: Sun Mar 22, 2015 1:51 am

Re: Bug in my mod exposed bug in DaggerfallItemMakerWindow

Post by Interkarma »

Thank you Pango! :)

Post Reply