Alphathree33
Platinum Member
I had a hard-coded value (19) in one of my functions back when it only did one thing.
The value was an index offset in a string, and at the beginning, the string was always the same.
Well I changed the function to take the string as an argument, and for three weeks I've been using it with the hard-coded index and variable strings without issue.
This is because, as it turns out, all of the strings I was feeding it were by chance the same length. Until today. Which led me on an hour-long bug hunt followed by a 'DOH!' when I saw the 19.
String.length baby, String.length...
The value was an index offset in a string, and at the beginning, the string was always the same.
Well I changed the function to take the string as an argument, and for three weeks I've been using it with the hard-coded index and variable strings without issue.
This is because, as it turns out, all of the strings I was feeding it were by chance the same length. Until today. Which led me on an hour-long bug hunt followed by a 'DOH!' when I saw the 19.
String.length baby, String.length...