We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 080ff6d commit 6fe978dCopy full SHA for 6fe978d
jbmc/src/java_bytecode/java_class_loader.cpp
@@ -294,10 +294,14 @@ std::string java_class_loadert::file_to_class_name(const std::string &file)
294
result=std::string(result, 2, std::string::npos);
295
#endif
296
297
- // slash to dot
298
- for(std::string::iterator it=result.begin(); it!=result.end(); it++)
299
- if(*it=='/')
300
- *it='.';
+ // slash (and backslash) to dot
+ for(auto &ch : result)
+#ifdef _WIN32
+ if(ch == '/' || ch == '\\')
301
+#else
302
+ if(ch == '/')
303
+#endif
304
+ ch = '.';
305
306
return result;
307
}
0 commit comments