mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-20 03:24:55 +00:00
Merge pull request #387 from jawallace/hex_viewer
Fix string out of bounds exception on non-windows.
This commit is contained in:
commit
40e55a4f64
@ -102,10 +102,10 @@ public class DataConversion {
|
|||||||
outputStringBuilder.append(" ");
|
outputStringBuilder.append(" ");
|
||||||
|
|
||||||
// print the ascii columns
|
// print the ascii columns
|
||||||
String ascii = new String(array, curOffset, lineLen);
|
String ascii = new String(array, curOffset, lineLen, java.nio.charset.StandardCharsets.US_ASCII);
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
char c = ' ';
|
char c = ' ';
|
||||||
if (i < lineLen) {
|
if (i < ascii.length()) {
|
||||||
c = ascii.charAt(i);
|
c = ascii.charAt(i);
|
||||||
int dec = (int) c;
|
int dec = (int) c;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user