We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac338df commit 44e7a9eCopy full SHA for 44e7a9e
src/fn_strings.cpp
@@ -163,6 +163,11 @@ namespace Sass {
163
String_Constant* s = ARG("$string", String_Constant);
164
double start_at = ARGVAL("$start-at");
165
double end_at = ARGVAL("$end-at");
166
+
167
+ if (start_at != (int)start_at) {
168
+ error("$start-at: " + std::to_string(start_at) + " is not an int", pstate, traces);
169
+ }
170
171
String_Quoted* ss = Cast<String_Quoted>(s);
172
173
std::string str(s->value());
@@ -173,6 +178,10 @@ namespace Sass {
178
end_at = -1;
174
179
}
175
180
181
+ if (end_at != (int)end_at) {
182
+ error("$end-at: " + std::to_string(end_at) + " is not an int", pstate, traces);
183
184
176
185
if (end_at == 0 || (end_at + size) < 0) {
177
186
if (ss && ss->quote_mark()) newstr = quote("");
187
return SASS_MEMORY_NEW(String_Quoted, pstate, newstr);
0 commit comments