Skip to content

Commit

Permalink
fix: undo invalid refactoring (#124)
Browse files Browse the repository at this point in the history
The pattern matching changed the behavior of the code into the wrong one.
See #116 (comment)

Notice the refactor operator did warn this might not be a correct refactoring:
![afbeelding](https://github.com/have-fun-was-taken/yafc-ce/assets/4461459/5a3702fb-6326-418a-9777-b538867db8de)
  • Loading branch information
shpaass authored May 10, 2024
2 parents 19b1d24 + f38229b commit 2cf2c0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Yafc/Windows/ProjectPageSettingsPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static void LoadProjectPageFromClipboard() {
deflateStream.CopyTo(ms);
byte[] bytes = ms.GetBuffer();
int index = 0;
if (DataUtils.ReadLine(bytes, ref index) is not "YAFC" or not "ProjectPage") {
if (DataUtils.ReadLine(bytes, ref index) != "YAFC" || DataUtils.ReadLine(bytes, ref index) != "ProjectPage") {
throw new InvalidDataException();
}

Expand Down

0 comments on commit 2cf2c0b

Please sign in to comment.