]> Pileus Git - ~andy/ct/blobdiff - knot/html.ct
Memory fixes
[~andy/ct] / knot / html.ct
index fa6e766d20cb8d4c4782bfcee22fdd1240b2296d..a80c21d450d15db9f533d28bbf0c26b5e8702066 100644 (file)
                </style>
        </head>
        <body>
-       <table cellpadding="0" cellspacing="0">
-               <% for (int row = 1; rows[row].cols; row++) { %>
-               <tr>
-                       <% for (int col = 1; col < rows[row].ncols; col++) { %>
-                       <td>
-                               <% print_img(rows[row].cols[col].bot); %>
-                               <% print_img(rows[row].cols[col].top); %>
-                       </td>
+               <table cellpadding="0" cellspacing="0">
+                       <% for (int row = 0; rows[row].ncols >= 0; row++) { %>
+                       <tr>
+                               <% for (int col = 0; col < rows[row].ncols; col++) { %>
+                               <td>
+                                       <% print_img(rows[row].cols[col].bot); %>
+                                       <% print_img(rows[row].cols[col].top); %>
+                               </td>
+                               <% } %>
+                       </tr>
                        <% } %>
-               </tr>
-               <% } %>
                </table>
        </body>
 </html>