Added ordinal comparison to string index search.

This commit is contained in:
Jarl Gullberg 2017-05-29 18:59:37 +02:00
parent 760e68ed4e
commit 71c900630f
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -334,7 +334,7 @@ namespace OpenTK.Rewrite
// something like "type namespace.class::method(type arg)" // something like "type namespace.class::method(type arg)"
var module = il.Body.Method.FullName; var module = il.Body.Method.FullName;
module = module.Substring(module.IndexOf(' ') + 1); module = module.Substring(module.IndexOf(' ') + 1);
module = module.Substring(0, module.IndexOf("::")); module = module.Substring(0, module.IndexOf("::", StringComparison.Ordinal));
module = module.Substring(0, module.LastIndexOf('.')); module = module.Substring(0, module.LastIndexOf('.'));
// Only works for Graphics modules due to hardcoded use of // Only works for Graphics modules due to hardcoded use of