gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r9699: fix amf reference debugging o


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9699: fix amf reference debugging output
Date: Mon, 08 Sep 2008 22:21:44 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9699
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Mon 2008-09-08 22:21:44 +0200
message:
  fix amf reference debugging output
modified:
  libcore/as_value.cpp
=== modified file 'libcore/as_value.cpp'
--- a/libcore/as_value.cpp      2008-09-08 20:16:45 +0000
+++ b/libcore/as_value.cpp      2008-09-08 20:21:44 +0000
@@ -2228,10 +2228,10 @@
             as_object* obj = to_object().get();
             assert(obj);
 
-            size_t idx = offsetTable.size(); // 0 for the first, etc...
             OffsetTable::iterator it = offsetTable.find(obj);
             if ( it == offsetTable.end() )
             {
+                size_t idx = offsetTable.size(); // 0 for the first, etc...
                 log_debug("serializing object (or function) with index %d", 
idx);
                 offsetTable[obj] = idx;
                 buf.appendByte(amf::Element::OBJECT_AMF0);
@@ -2245,9 +2245,10 @@
             }
             else // object already seen
             {
+                size_t idx = it->second;
                 log_debug("serializing object (or function) as reference to 
%d", idx);
                 buf.appendByte(amf::Element::REFERENCE_AMF0);
-                buf.appendNetworkShort(it->second);
+                buf.appendNetworkShort(idx);
             }
             return true;
         }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]