Fixed the getNumberArg issue, which is what was causing so much headache.
Multiplier variable not set correctly. +- metadataops.c +- sim02
This commit is contained in:
parent
5a747ab1dd
commit
02cb8b33e6
2 changed files with 3 additions and 3 deletions
|
|
@ -545,16 +545,16 @@ int getNumberArg(int *number, const char *inputStr, int index)
|
|||
index = index + 1;
|
||||
}
|
||||
// loop across string length
|
||||
while(isDigit(inputStr[index]) == true &&
|
||||
while(isDigit(inputStr[index]) &&
|
||||
inputStr[index] != NULL_CHAR)
|
||||
{
|
||||
// set digit found flag
|
||||
foundDigit = true;
|
||||
// assign digit to output
|
||||
(*number) = (*number) * multiplier + inputStr[index] - '0';
|
||||
(*number) = (*number) * multiplier + (inputStr[index] - '0');
|
||||
// increment index and multiplier
|
||||
index = index + 1;
|
||||
multiplier = multiplier + 1;
|
||||
multiplier = 10;
|
||||
}
|
||||
// check for digit not found
|
||||
if(!foundDigit)
|
||||
|
|
|
|||
BIN
Sim02/sim02
BIN
Sim02/sim02
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue