diff --git a/VERSION b/VERSION index 416bfb0a2..50c76ef87 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.9 +0.5.10 diff --git a/data/formats/fb2/FBReaderVersion.ent b/data/formats/fb2/FBReaderVersion.ent index a9ba8a8d0..7288a47ba 100644 --- a/data/formats/fb2/FBReaderVersion.ent +++ b/data/formats/fb2/FBReaderVersion.ent @@ -1 +1 @@ - + diff --git a/native/sources/DeflatingDecompressor/DeflatingDecompressor.cpp b/native/sources/DeflatingDecompressor/DeflatingDecompressor.cpp index 9e8ccaf3a..cac0632cd 100644 --- a/native/sources/DeflatingDecompressor/DeflatingDecompressor.cpp +++ b/native/sources/DeflatingDecompressor/DeflatingDecompressor.cpp @@ -63,7 +63,7 @@ jint Java_org_amse_ys_zip_NativeDeflatingDecompressor_inflate(JNIEnv *env, jobje stream->avail_out = outLength; const int code = inflate(stream, Z_SYNC_FLUSH); env->ReleaseByteArrayElements(in, inStart, 0); - env->ReleaseByteArrayElements(out, outStart, 0); + env->ReleaseByteArrayElements(out, outStart, outLength - stream->avail_out); if ((code == Z_OK) || (code == Z_STREAM_END)) { return ((inLength - stream->avail_in) << 16) + outLength - stream->avail_out; } diff --git a/package_tool.sh b/package_tool.sh index b8028c831..a7509e039 100755 --- a/package_tool.sh +++ b/package_tool.sh @@ -13,7 +13,10 @@ if [ $# -ne 1 -a $# -ne 2 ]; then fi updateVersion() { - intversion=`echo $version | sed "s/\\./0/g" | sed -E "s/^0+//"` + major=`echo $version | cut -d . -f 1` + minor=`echo $version | cut -d . -f 2` + micro=`echo $version | cut -d . -f 3` + let intversion=10000*$major+100*$minor+$micro echo "" > data/formats/fb2/FBReaderVersion.ent sed "s/@INTVERSION@/$intversion/" platform/android/AndroidManifest.xml.pattern | sed "s/@VERSION@/$version/" > platform/android/AndroidManifest.xml } diff --git a/platform/android/AndroidManifest.xml b/platform/android/AndroidManifest.xml index e4616793a..0f5b07084 100644 --- a/platform/android/AndroidManifest.xml +++ b/platform/android/AndroidManifest.xml @@ -1,6 +1,6 @@ - - + + diff --git a/platform/android/AndroidManifest.xml.pattern b/platform/android/AndroidManifest.xml.pattern index aa33999b6..c1bb4dd02 100644 --- a/platform/android/AndroidManifest.xml.pattern +++ b/platform/android/AndroidManifest.xml.pattern @@ -1,6 +1,6 @@ - + diff --git a/platform/android/icons/menu/ic_menu_night.png b/platform/android/icons/menu/ic_menu_night.png index 1bbe767de..8fd2048d0 100644 Binary files a/platform/android/icons/menu/ic_menu_night.png and b/platform/android/icons/menu/ic_menu_night.png differ diff --git a/platform/android/icons/tree/ic_list_buy.png b/platform/android/icons/tree/ic_list_buy.png index 866161529..d924df6bd 100644 Binary files a/platform/android/icons/tree/ic_list_buy.png and b/platform/android/icons/tree/ic_list_buy.png differ diff --git a/platform/android/icons/tree/ic_list_flag.png b/platform/android/icons/tree/ic_list_flag.png index b0022728d..f778939e8 100644 Binary files a/platform/android/icons/tree/ic_list_flag.png and b/platform/android/icons/tree/ic_list_flag.png differ diff --git a/src/org/geometerplus/fbreader/formats/xhtml/XHTMLTagImageAction.java b/src/org/geometerplus/fbreader/formats/xhtml/XHTMLTagImageAction.java index d1616e6d1..02ecd0cde 100644 --- a/src/org/geometerplus/fbreader/formats/xhtml/XHTMLTagImageAction.java +++ b/src/org/geometerplus/fbreader/formats/xhtml/XHTMLTagImageAction.java @@ -35,20 +35,22 @@ class XHTMLTagImageAction extends XHTMLTagAction { protected void doAtStart(XHTMLReader reader, ZLStringMap xmlattributes) { String fileName = xmlattributes.getValue(myNameAttribute); if (fileName != null) { - final BookReader modelReader = reader.getModelReader(); - boolean flag = modelReader.paragraphIsOpen(); - if (flag) { - modelReader.endParagraph(); - } if (fileName.startsWith("./")) { fileName = fileName.substring(2); } final ZLFile imageFile = ZLFile.createFileByPath(reader.getPathPrefix() + fileName); - final String imageName = imageFile.getName(false); - modelReader.addImageReference(imageName, (short)0); - modelReader.addImage(imageName, new ZLFileImage("image/auto", imageFile)); - if (flag) { - modelReader.beginParagraph(); + if (imageFile != null) { + final BookReader modelReader = reader.getModelReader(); + boolean flag = modelReader.paragraphIsOpen(); + if (flag) { + modelReader.endParagraph(); + } + final String imageName = imageFile.getName(false); + modelReader.addImageReference(imageName, (short)0); + modelReader.addImage(imageName, new ZLFileImage("image/auto", imageFile)); + if (flag) { + modelReader.beginParagraph(); + } } } }