]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/mod_tables.cpp
fixed the rule for the DLL so it doesn't build the .lib file twice
[wxWidgets.git] / src / html / mod_tables.cpp
index b3d99ecb213251ab71191a14249a59e20167f33c..35f14a284902b7346aba45fe9e9790202741f6ae 100644 (file)
@@ -122,8 +122,8 @@ wxHtmlTableCell::wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& t
     m_tBkg = m_rBkg = -1;
     if (tag.HasParam("BGCOLOR")) tag.ScanParam("BGCOLOR", "#%lX", &m_tBkg);
     if (tag.HasParam("VALIGN")) m_tValign = tag.GetParam("VALIGN"); else m_tValign = wxEmptyString;
-    if (tag.HasParam("CELLSPACING")) tag.ScanParam("CELLSPACING", "%i", &m_Spacing); else m_Spacing = 2;
-    if (tag.HasParam("CELLPADDING")) tag.ScanParam("CELLPADDING", "%i", &m_Padding); else m_Padding = 3;
+    if (tag.HasParam("CELLSPACING") && tag.ScanParam("CELLSPACING", "%i", &m_Spacing) == 1) {} else m_Spacing = 2;
+    if (tag.HasParam("CELLPADDING") && tag.ScanParam("CELLPADDING", "%i", &m_Padding) == 1) {} else m_Padding = 3;
 
     if (m_HasBorders)
         SetBorder(TABLE_BORDER_CLR_1, TABLE_BORDER_CLR_2);
@@ -169,7 +169,7 @@ void wxHtmlTableCell::ReallocRows(int rows)
     m_CellInfo = (cellStruct**) realloc(m_CellInfo, sizeof(cellStruct*) * rows);
     if (m_NumCols != 0) {
         int x = rows - 1;
-        m_CellInfo[x] = new cellStruct[m_NumCols];
+        m_CellInfo[x] = (cellStruct*) malloc(sizeof(cellStruct) * m_NumCols);
         for (int i = 0; i < m_NumCols; i++)
             m_CellInfo[x][i].flag = cellFree;
     }