Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Commit cdb9813

Browse files
author
Aaron Leung
committed
Merge pull request sass#23 from Igorbek/master
Fix bug in loop in Document::emit_css when size_t is unsigned.
2 parents 3f580e3 + 2ce497b commit cdb9813

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

document.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ namespace Sass {
136136
// trim trailing whitespace
137137
if (!retval.empty()) {
138138
size_t newlines = 0;
139-
for (size_t i = retval.length() - 1; i >= 0; --i) {
139+
size_t i = retval.length();
140+
while (i--) {
140141
if (retval[i] == '\n') {
141142
++newlines;
142143
continue;

0 commit comments

Comments
 (0)