summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-06-06 14:12:00 +0200
committerDavid Tardon <dtardon@redhat.com>2017-06-06 14:13:00 +0200
commitcc2db25645ede743bdc3824fe7d26ea4beda6a96 (patch)
treeec0f5daf17c95c35e310e56a378e1655dd6983cb
parent707eb4db1918658e0c2c2c2033c6a69f80c4eafd (diff)
libstaroffice: use correct loop index
Change-Id: I1b862ed2d69c41361bc8c26d96c5329473fe64aa
-rw-r--r--external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.127
-rw-r--r--external/libstaroffice/UnpackedTarball_libstaroffice.mk1
2 files changed, 28 insertions, 0 deletions
diff --git a/external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1 b/external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1
new file mode 100644
index 000000000000..f004e5674da6
--- /dev/null
+++ b/external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1
@@ -0,0 +1,27 @@
+From 2d6253c7a692a3d92785dd990fce7256ea05e794 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Fri, 7 Apr 2017 19:28:55 +0200
+Subject: [PATCH] ofz#1029 use correct loop index
+
+To be honest, I think this would be clearer as two separate reads to two
+separate vars...
+---
+ src/lib/StarWriterStruct.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/StarWriterStruct.cxx b/src/lib/StarWriterStruct.cxx
+index 5893302..d1ad366 100644
+--- a/src/lib/StarWriterStruct.cxx
++++ b/src/lib/StarWriterStruct.cxx
+@@ -327,7 +327,7 @@ bool DatabaseName::read(StarZone &zone)
+ }
+ data.m_name=libstoff::getString(text);
+ int positions[2];
+- for (int j=0; j<2; ++j) positions[i]=int(input->readULong(4));
++ for (int j=0; j<2; ++j) positions[j]=int(input->readULong(4));
+ data.m_selection=STOFFVec2i(positions[0],positions[1]);
+ m_dataList.push_back(data);
+ }
+--
+2.13.0
+
diff --git a/external/libstaroffice/UnpackedTarball_libstaroffice.mk b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
index e85d13aa8dc6..271e6ca120f7 100644
--- a/external/libstaroffice/UnpackedTarball_libstaroffice.mk
+++ b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
endif
$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
+ external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1 \
))
# vim: set noet sw=4 ts=4: