diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-18 14:14:58 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-18 14:46:57 +0900 |
| commit | 7f6aedf588c7c79b8b5f788703e9ff04183358ae (patch) | |
| tree | 7ce7f7d751ac6c62784dc761b8c1a576ccf2c825 | |
| parent | 37a07263c70308f7ddef4aac747446d5ede82374 (diff) | |
| download | tqt-fix/reading-serialized-pointer.tar.gz tqt-fix/reading-serialized-pointer.zip | |
Don't look up '0-serialized' pointers in TQGDict. This replaces PR #263fix/reading-serialized-pointer
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
| -rw-r--r-- | src/tools/tqgdict.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tools/tqgdict.cpp b/src/tools/tqgdict.cpp index d810cbe0f..b587eb9fb 100644 --- a/src/tools/tqgdict.cpp +++ b/src/tools/tqgdict.cpp @@ -945,12 +945,8 @@ TQDataStream &TQGDict::read( TQDataStream &s ) TQ_UINT32 k; s >> k; read( s, d ); - // ### cannot insert 0 - this renders the thing - // useless since all pointers are written as 0, - // but hey, serializing pointers? can it be done - // at all, ever? - if ( k ) - look_ptr( (void *)k, d, op_insert ); + // Pointer real values are not serialized, so it doesn't make sense + // to insert null values back into the dictionary by calling 'look_ptr' here } break; } @@ -980,7 +976,7 @@ TQDataStream& TQGDict::write( TQDataStream &s ) const s << (TQ_UINT32)((TQIntBucket*)n)->getKey(); break; case PtrKey: - s << (TQ_UINT32)0; // ### cannot serialize a pointer + s << (TQ_UINT32)0; // ### it doesn't make sense to serialize a pointer's value break; } write( s, n->getData() ); // write data |
