POV-Ray : Newsgroups : povray.beta-test : v3.8 Issues with dictionary copies. : v3.8 Issues with dictionary copies. Server Time
18 Apr 2024 17:32:20 EDT (-0400)
  v3.8 Issues with dictionary copies.  
From: William F Pokorny
Date: 21 Apr 2021 09:18:54
Message: <6080263e$1@news.povray.org>
Documenting fixes(***) for v3.8 dictionary bugs discussed in the thread:

http://news.povray.org/povray.general/thread/%3C607689e7%241%40news.povray.org%3E/

XnsAD0BC42BCF8Aseed7@news.povray.org

---

In symboltable.cpp Change:

SymbolTable::SymbolTable(const SymbolTable& obj)
{
     for (int i = SYM_TABLE_SIZE - 1; i >= 0; i--)
     {
         SYM_ENTRY* oldEntry = obj.mapHashTable[i];
         while (oldEntry)
         {
             SYM_ENTRY* newEntry = Copy_Entry(oldEntry);
             newEntry->next = obj.mapHashTable[i];
             mapHashTable[i] = newEntry;
             oldEntry = oldEntry->next;
         }
     }
}

to:

SymbolTable::SymbolTable(const SymbolTable& obj)
{
     for (int i = SYM_TABLE_SIZE - 1; i >= 0; i--)
     {
         mapHashTable[i] = nullptr; // ***
         SYM_ENTRY* oldEntry = obj.mapHashTable[i];
         while (oldEntry)
         {
             SYM_ENTRY* newEntry = Copy_Entry(oldEntry);
             newEntry->next = mapHashTable[i]; // ***
             mapHashTable[i] = newEntry;
             oldEntry = oldEntry->next;
         }
     }
}

Bill P.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.