Skip to content

Commit 7dff55c

Browse files
committed
Fixing DEFMACRO to read complete table in row/col order.
1 parent 6689061 commit 7dff55c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/latex.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,10 @@ void SpLatex::defmacro(size_t ln, size_t indent, const std::string& cmdline)
481481
reformat.prepare(sql);
482482

483483
std::ostringstream oss;
484-
unsigned int count = sql->num_cols();
485-
while (sql->step())
484+
for (unsigned int row = 0; row < sql->num_rows(); ++row)
486485
{
487-
for (unsigned int col = 0; col < count; ++col) {
486+
for (unsigned int col = 0; col < sql->num_cols(); ++col)
487+
{
488488
if (col != 0) oss << std::endl;
489489
oss << "\\def\\"
490490
<< str_reduce(sql->col_name(col))

0 commit comments

Comments
 (0)