Skip to content

Commit

Permalink
omniload.c: added condition for extra figures test
Browse files Browse the repository at this point in the history
If figure weight is variable then testing for extra figures is not
applicable and may cause false errors.
  • Loading branch information
AndreyDobrovolskyOdessa committed Mar 18, 2024
1 parent 4c35464 commit d102a4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Omnimino Copyright (c) 2019-2023 Andrey Dobrovolsky
Omnimino Copyright (c) 2019-2024 Andrey Dobrovolsky

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void Report(struct Omnimino *G) {
}


#define COPYRIGHT "Omnimino 0.6 Copyright (C) 2019-2023 Andrey Dobrovolsky\n\n"
#define COPYRIGHT "Omnimino 0.6.1 Copyright (C) 2019-2024 Andrey Dobrovolsky\n\n"
#define USAGE "Usage: omnimino infile\n ls *.mino | omnimino > outfile\n\n"


Expand Down
2 changes: 1 addition & 1 deletion omniload.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static int CheckFigures(void) {
if (FW > WeightMax) {
snprintf(MsgBuf, OM_STRLEN, "[18] Weight[%d] (%d) > WeightMax (%d)", i, FW, WeightMax); return 1;
}
if ((F[0] - Block) >= (int)TotalArea) {
if (FixedSequence && ((F[0] - Block) >= (int)TotalArea)) {
snprintf(MsgBuf, OM_STRLEN, "[18] Figure[%d] is unnecessary.", i); return 1;
}
}
Expand Down

0 comments on commit d102a4f

Please sign in to comment.