Menu

Commit [r5353]  Maximize  Restore  History

Fixed bug 2976104:

java.lang.StringIndexOutOfBoundsException: String index out of range: 94
at java.lang.String.substring(Unknown Source)
at edu.rice.cs.drjava.platform.WindowsRegistry.nullTerminatedToString(WindowsRegistry.java:612)

According to the String Javadocs, "The length of the new String is a
function of the charset, and hence may not be equal to the length of
the byte array."

We cannot use barr.length to index in the string, we
need to index in the array.

Cannot test this on a Chinese system, but I'm fairly certain this should
work.

mgricken 2010-08-10

changed /trunk/drjava/lib/platform.jar
changed /trunk/platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry.class
changed /trunk/platform/src-windows/edu/rice/cs/drjava/platform/WindowsRegistry.java
added /trunk/platform/src-windows/edu/rice/cs/drjava/platform/WindowsRegistryTest.java
/trunk/drjava/lib/platform.jar
Binary file was changed.
/trunk/platform/src-windows/edu/rice/cs/drjava/platform/WindowsRegistry.java Diff Switch to side-by-side view
Loading...
/trunk/platform/src-windows/edu/rice/cs/drjava/platform/WindowsRegistryTest.java Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB