cryptobiu / libscapi

Comprehensive Open Source Library for Secure Multiparty Computation
MIT License
180 stars 66 forks source link

Fix a bug with `toString` in `Dlog.hpp` #28

Closed fabrice102 closed 7 years ago

fabrice102 commented 7 years ago

Fix a bug with toString in Dlog.hpp.

Bug found thanks to the following warning from clang:

Simple/../../include/primitives/Dlog.hpp:643:40: warning: adding 'int' to a string does not append
      to the string [-Wstring-plus-int]
                string s = "ECF2mTrinomialBasis [k=" + k;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Simple/../../include/primitives/Dlog.hpp:643:40: note: use array indexing to silence this warning
                string s = "ECF2mTrinomialBasis [k=" + k;
                                                     ^
                           &                         [  ]
Simple/../../include/primitives/Dlog.hpp:644:15: warning: adding 'int' to a string does not append
      to the string [-Wstring-plus-int]
                s += ", m=" + m;
                     ~~~~~~~^~~
Simple/../../include/primitives/Dlog.hpp:644:15: note: use array indexing to silence this warning
                s += ", m=" + m;
                            ^
                     &      [  ]

The copyright of the file appears to have changed because it used LF end-of-line markers instead of CRLF (as the other parts of the file).