[Pkg-octave-commit] [SCM] octave-miscellaneous branch, master, updated. 6b7f8024ae4a8952e0660785252a1a5fd44b27a7

Rafael Laboissiere rafael at debian.org
Sun May 24 00:01:04 UTC 2009


The following commit has been merged in the master branch:
commit 6b7f8024ae4a8952e0660785252a1a5fd44b27a7
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sun May 24 01:48:22 2009 +0200

    Add patch to fix bug related to the return type of str.find()

diff --git a/debian/changelog b/debian/changelog
index bdb6b94..39c8128 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ octave-miscellaneous (1.0.8-1) UNRELEASED; urgency=low
 
   * New upstream release
   * debian/patches/build-hex2num: Adjust patch for new upstream version
+  * debian/patches/cell2csv-str-find: Fix bug related to the return type
+    of the str.find() function
   * debian/control:
     + (Standards-Version): Bump to 3.8.1 (add file debian/README.source)
     + (Depends): Add ${misc:Depends}
diff --git a/debian/patches/cell2csv-str-find b/debian/patches/cell2csv-str-find
new file mode 100644
index 0000000..3ca2c09
--- /dev/null
+++ b/debian/patches/cell2csv-str-find
@@ -0,0 +1,17 @@
+The str.find() function returns a size_type.  On 64-bits systems like
+amd64, storing the result of str.find() in an unsigned int variable is
+bound to give problems.  Fix that.
+
+ -- Rafael Laboissiere <rafael at debian.org>  Sun, 23 May 2009 11:41:14 +0200
+
+--- a/src/cell2csv.cc
++++ b/src/cell2csv.cc
+@@ -92,7 +92,7 @@
+ 	/* Output string value */
+ 	std::string str = c(i, j).string_value();
+ 	if (str.find(sep) != str.npos) {
+-	  unsigned int pos = 0;
++	  size_t pos = 0;
+ 	  while ((pos=str.find(prot, pos)) != str.npos) {
+ 	    str.replace(pos, 1, prot+prot);
+ 	    pos += 2;
diff --git a/debian/patches/series b/debian/patches/series
index 08e64b4..8737f6f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 special_matrix_lauchli
 autoload-num2hex
 build-hex2num
+cell2csv-str-find

-- 
octave-miscellaneous



More information about the Pkg-octave-commit mailing list