1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

fixed bug 308535, fail to read symbol name of eight bytes.

This commit is contained in:
Ling Wang 2010-04-08 18:02:18 +00:00
parent dd621839a6
commit ab2d1ddfee

View file

@ -406,7 +406,7 @@ public class Coff {
public short n_scnum; /* short, Section number. */
public int n_type; /* Unsigned short. Symbolic type. */
public byte n_sclass; /* char, Storage class. */
public byte n_numaux; /* char. Nuymber of auxiliary enties. */
public byte n_numaux; /* char. Number of auxiliary enties. */
public Symbol(RandomAccessFile file) throws IOException {
this(file, file.getFilePointer());
@ -430,12 +430,14 @@ public class Coff {
}
public String getName() {
// For a long name, _n_name[0] == 0 and this would just return empty string.
for (int i = 0; i < _n_name.length; i++) {
if (_n_name[i] == 0) {
return new String(_n_name, 0, i);
}
}
return ""; //$NON-NLS-1$
// all eight bytes are filled
return new String(_n_name);
}
public String getName(byte[] table) {