Skip to content

Commit 6c71e07

Browse files
committed
bug: Allowing empty units for various command line options
Many options do not require a unit of measure to be provided but the low-level code was requiring it. This fixes it so that a unit is not required and allows a utility to choose when a unit is required or what the default behavior should be when the units are empty. [#181] Signed-off-by: Tyler Erickson <[email protected]>
1 parent d3010e4 commit 6c71e07

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

subprojects/opensea-common

utils/C/openSeaChest/openSeaChest_Configure.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ int main(int argc, char* argv[])
566566
// first check is a unit is provided.
567567
if (unit)
568568
{
569-
if (strcmp(unit, "ms") == 0)
569+
if (strcmp(unit, "ms") == 0 || strcmp(unit, "") == 0)
570570
{
571571
multiplier = UINT32_C(1);
572572
}
@@ -618,7 +618,7 @@ int main(int argc, char* argv[])
618618
// first check is a unit is provided.
619619
if (unit)
620620
{
621-
if (strcmp(unit, "ms") == 0)
621+
if (strcmp(unit, "ms") == 0 || strcmp(unit, "") == 0)
622622
{
623623
multiplier = UINT32_C(1);
624624
}

0 commit comments

Comments
 (0)