「view this page in B3 βῆτα server」

Revisions №58416

branch: master 「№58416」
Commited by: Vikram K. Mulligan
GitHub commit link: 「6ace300644ff839f」 「№1051」
Difference from previous tested commit:  code diff
Commit date: 2016-01-24 23:10:07

Merge pull request #1051 from RosettaCommons/vmullig/carbohydrate_issue Fixing an issue with the CarbohydratePoseIOTests, which were randomly failing for me. I tracked it down to the use of the atoi() function in core::io::carbohydrates::sugar_modifications_from_suffix(). The atoi() function expects a pointer to the first element of a null-terminated char array, but was being passed the address of a single char. As such, it was progressively reading from that memory location. In most cases, it would interpret the next byte as something other than a number, and would therefore only return the number associated with the input char. Sometimes, though, the next byte would correspond to the ASCII for a number, which would result in misinterpretation of the char passed in (e.g. 68 or 687 for '6', or whatnot). The solution was to implement a simple utility function to convert a single-byte char to the integer that it represents. All integration test changes seen are the switching behaviour seen in the unstable ones.

...