diff --git a/libcore/swf/PlaceObject2Tag.cpp b/libcore/swf/PlaceObject2Tag.cpp
index 5b4fbba..e6c780f 100644
--- a/libcore/swf/PlaceObject2Tag.cpp
+++ b/libcore/swf/PlaceObject2Tag.cpp
@@ -164,19 +164,20 @@ PlaceObject2Tag::readPlaceActions(SWFStream& in)
             }
     
             key::code ch = key::INVALID;
+            const bool hasKeyPress = flags & (1 << 17);
             
-            // has KeyPress event
-            if (flags & (1 << 17)) {
+            if (hasKeyPress) {
                 in.ensureBytes(1);
                 ch = static_cast<key::code>(in.read_u8());
-                --event_length;
             }
-    
+
             // Read the actions for event(s)
             // auto_ptr here prevents leaks on malformed swf
-            std::auto_ptr<action_buffer> action(new action_buffer(_movie_def));
-            action->read(in, in.tell() + event_length);
-            _actionBuffers.push_back(action); 
+            if (event_length > 0) {
+                std::auto_ptr<action_buffer> action(new action_buffer(_movie_def));
+                action->read(in, in.tell() + event_length - (hasKeyPress ? -1 : 0));
+                _actionBuffers.push_back(action); 
+            }
     
             // If there is no end tag, action_buffer appends a null-terminator,
             // and fails this check. As action_buffer should check bounds, we
