summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/GMPString.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/GMPString.cc b/lib/GMPString.cc
index 83c6d85..9e34d2e 100644
--- a/lib/GMPString.cc
+++ b/lib/GMPString.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: GMPString.cc,v 1.7 2007-05-30 11:57:09 pixel Exp $ */
+/* $Id: GMPString.cc,v 1.8 2007-09-04 14:04:15 pixel Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -26,7 +26,7 @@
#include <gmpxx.h>
#include "GMPString.h"
-GMPString::GMPString(const GMPString & s) : str(s.str) {
+GMPString::GMPString(const GMPString & s) : str(strdup(s.str)) {
}
GMPString::GMPString(const mpz_class & z) {
@@ -46,6 +46,7 @@ GMPString::operator String() const {
}
GMPString::~GMPString() {
+ free(str);
}
#endif