We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7d2b17 commit 56aa050Copy full SHA for 56aa050
jbmc/src/java_bytecode/java_class_loader.cpp
@@ -312,10 +312,14 @@ std::string java_class_loadert::file_to_class_name(const std::string &file)
312
result=std::string(result, 2, std::string::npos);
313
#endif
314
315
- // slash to dot
316
- for(std::string::iterator it=result.begin(); it!=result.end(); it++)
317
- if(*it=='/')
318
- *it='.';
+ // slash (and backslash) to dot
+ for(auto &ch : result)
+#ifdef _WIN32
+ if(ch == '/' || ch == '\\')
319
+#else
320
+ if(ch == '/')
321
+#endif
322
+ ch = '.';
323
324
return result;
325
}
0 commit comments