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

Revisions №61015

branch: master 「№61015」
Commited by: Vikram K. Mulligan
GitHub commit link: 「0924b7ecfe83abac」 「№4335」
Difference from previous tested commit:  code diff
Commit date: 2019-10-31 18:36:58

Merge pull request #4335 from RosettaCommons/vmullig/int_to_size_in_string_util Fixing bug that was preventing read of some large text files. In our string utilities, we have a function that reads in a text file and returns a string with the file's contents. This function reserves space based on the number of characters read in. This count was unfortunately being stored in a standard, signed int, which meant that long text files could result in overflow and a negative value being passed to string::reserve(). This corrects this by switching the integer to a platform::Size, which guarantees that the number of numbers that can be stored is greater than or equal to the maximum size of string that you could store.

...