CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/11/27 23:29:40
Modified files: . : ChangeLog server/swf : tag_loaders.cpp Log message: fix parsing of the SERIALNUMBER tag. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4988&r2=1.4989 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.153&r2=1.154 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4988 retrieving revision 1.4989 diff -u -b -r1.4988 -r1.4989 --- ChangeLog 27 Nov 2007 22:06:02 -0000 1.4988 +++ ChangeLog 27 Nov 2007 23:29:39 -0000 1.4989 @@ -1,5 +1,10 @@ 2007-11-27 Sandro Santilli <[EMAIL PROTECTED]> + * server/swf/tag_loaders.cpp (serialnumber_loader): fix parsing + of the SERIALNUMBER tag. + +2007-11-27 Sandro Santilli <[EMAIL PROTECTED]> + * server/swf.h: define ACTION_FSCOMMAND2 * server/vm/ASHandlers.{cpp,h}: stub support for fscommand2 (SWF7 opcode) Index: server/swf/tag_loaders.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v retrieving revision 1.153 retrieving revision 1.154 diff -u -b -r1.153 -r1.154 --- server/swf/tag_loaders.cpp 24 Nov 2007 17:21:45 -0000 1.153 +++ server/swf/tag_loaders.cpp 27 Nov 2007 23:29:39 -0000 1.154 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: tag_loaders.cpp,v 1.153 2007/11/24 17:21:45 strk Exp $ */ +/* $Id: tag_loaders.cpp,v 1.154 2007/11/27 23:29:39 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1407,14 +1407,28 @@ { assert(tag == SWF::SERIALNUMBER); // 41 - std::string serial; - in->read_string_with_length(in->get_tag_length(), serial); + in->ensureBytes(26); - IF_VERBOSE_PARSE ( - log_parse(_(" serialnumber = [[\n%s\n]]"), serial.c_str()); - ); + double id = in->read_u32(); + double edition = in->read_u32(); + int major = in->read_u8(); + int minor = in->read_u8(); + + uint32_t buildL = in->read_u32(); + uint32_t buildH = in->read_u32(); + uint64_t build = (((uint64_t)buildH) << 32) + buildL; + + uint32_t timestampL = in->read_u32(); + uint32_t timestampH = in->read_u32(); + // This timestamp is number of milliseconds since 1 Jan 1970 (epoch) + uint64_t timestamp = (((uint64_t)timestampH) << 32) + timestampL; + + std::stringstream ss; + ss << "SERIALNUMBER: Version " << id << "." << edition << "." << major << "." << minor; + ss << " - Build " << build; + ss << " - Timestamp " << timestamp; - log_msg(_("SERIALNUMBER: %s"), serial.c_str()); + log_msg("%s", ss.str().c_str()); // attach to movie_definition ? } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit