summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-02-09 16:33:36 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-02-09 16:33:40 +0100
commit13f7ae9457855a2140e5cfbe7041c99c468ed43a (patch)
treebb238d32eac336b7c60417fe774b2aa40253ae02
parentgui: fix console lockup when scrolling (diff)
downloadandroid_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.tar
android_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.tar.gz
android_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.tar.bz2
android_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.tar.lz
android_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.tar.xz
android_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.tar.zst
android_bootable_recovery-13f7ae9457855a2140e5cfbe7041c99c468ed43a.zip
-rwxr-xr-xmtp/MtpStorage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mtp/MtpStorage.cpp b/mtp/MtpStorage.cpp
index 1f4d142f0..5a6954822 100755
--- a/mtp/MtpStorage.cpp
+++ b/mtp/MtpStorage.cpp
@@ -714,7 +714,7 @@ int MtpStorage::inotify_t(void) {
MTPE("inotify_t Can't read inotify events\n");
}
- while (inotify_thread_kill.get_value() == 0) {
+ while (i < len && inotify_thread_kill.get_value() == 0) {
struct inotify_event *event = (struct inotify_event *) &buf[i];
if (event->len) {
MTPD("inotify event: wd: %i, mask: %x, name: %s\n", event->wd, event->mask, event->name);