Skip to content

Commit e381fe4

Browse files
committed
Include conversion: Don't try to convert an empty string.
1 parent 5db4c02 commit e381fe4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dstep/translator/IncludeHandler.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ private:
180180
/// Checks if the given include file name should be converted to an import declaration.
181181
bool isConvertableInclude (string include)
182182
{
183-
return cast(bool)(matchFirst(include, convertableIncludePattern));
183+
// Do not try to convert empty strings, no matter what the pattern says.
184+
return include != "" && cast(bool)(matchFirst(include, convertableIncludePattern));
184185
}
185186

186187

0 commit comments

Comments
 (0)