Skip to content

Commit 0f1ab9e

Browse files
authored
Merge pull request #169 from Entroper/hotfix
hotfix DecodeFlagsText
2 parents 6b4943e + 51f4825 commit 0f1ab9e

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

FF1Lib/FF1Rom.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace FF1Lib
1212
// ReSharper disable once InconsistentNaming
1313
public partial class FF1Rom : NesRom
1414
{
15-
public const string Version = "2.2.0";
15+
public const string Version = "2.2.1";
1616

1717
public const int RngOffset = 0x7F100;
1818
public const int RngSize = 256;

FF1Lib/Flags.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,16 @@ public static Flags DecodeFlagsText(string text)
324324
}
325325
foreach (var flagAttribute in flagAttributesForChar)
326326
{
327-
var outputValue = (charFlagValue & flagAttribute.Value.FlagBit) > 0;
328-
typeof(Flags).GetProperty(flagAttribute.Key).SetValue(result, outputValue);
327+
var property = typeof(Flags).GetProperty(flagAttribute.Key);
328+
var outputValue = charFlagValue & flagAttribute.Value.FlagBit;
329+
if (property.PropertyType == typeof(bool))
330+
{
331+
property.SetValue(result, outputValue > 0);
332+
}
333+
else
334+
{
335+
property.SetValue(result, outputValue);
336+
}
329337
}
330338
}
331339
return result;

FF1RandomizerOnline/Views/Shared/_Layout.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<ul class="nav navbar-nav">
3232
<li><a asp-area="" asp-controller="Home" asp-action="Randomize">Randomize</a></li>
3333
<li><a asp-area="" asp-controller="Home" asp-action="WhatsNew">What's New</a></li>
34-
<li><a href="https://github.com/Entroper/FF1Randomizer/blob/master/README.md">About</a></li>
35-
<li><a href="https://github.com/Entroper/FF1Randomizer/releases">Download</a></li>
36-
<li><a href="https://github.com/Entroper/FF1Randomizer/issues">Report a Bug</a></li>
34+
<li><a href="https://github.com/FiendsOfTheElements/FF1Randomizer/blob/master/README.md">About</a></li>
35+
<li><a href="https://github.com/FiendsOfTheElements/FF1Randomizer/releases">Download</a></li>
36+
<li><a href="https://github.com/FiendsOfTheElements/FF1Randomizer/issues">Report a Bug</a></li>
3737
</ul>
3838
</div>
3939
</div>

0 commit comments

Comments
 (0)