POV-Ray : Newsgroups : povray.beta-test : v3.8 Issues with dictionary copies. Server Time
28 Oct 2021 14:12:08 EDT (-0400)
  v3.8 Issues with dictionary copies. (Message 1 to 1 of 1)  
From: William F Pokorny
Subject: v3.8 Issues with dictionary copies.
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-2021 Persistence of Vision Raytracer Pty. Ltd.