TALibraryInCSharp
TALibraryInCSharp copied to clipboard
Minus DM infinite loop
Label_0186 infinite loop.
What is the error you are getting?
Looking at the code (see code below) I do not see where it could choke(seem like an infinite loop) unless you are entering a number for optInTimePeriod (method parameter) that is in the really high, the max is 0x186a0 (int 100,000). optInTimePeriod should never go above 100 or so, The default is 14.
// relevant code segments
if ((optInTimePeriod < 1) || (optInTimePeriod > 0x186a0)) // fails if negative or greater than 100,000 { return RetCode.BadParam; } ... int i = optInTimePeriod - 1; // setting i here based on optInTimePeriod ... i = (int)Globals.unstablePeriod[0x10]; // equals 16, might be 15 Label_0186: i--; // reduced i each loop if (i != 0) { .... goto Label_0186; }
Do not know how but the line:
i = (int)Globals.unstablePeriod[0x10];
Set the value of i to 0