~ubuntu-branches/ubuntu/wily/openmcdf/wily

« back to all changes in this revision

Viewing changes to src/OLECompoundFileStorage/DirectoryEntry.cs

  • Committer: Package Import Robot
  • Author(s): Mathieu Malaterre
  • Date: 2013-04-08 11:02:15 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130408110215-aleqo4zhjc3qgxnb
Tags: 1.5.4-1
* New upstream: 1.5.4
  - Use Hexbox for hexadecimal viewing

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
            }
286
286
            else
287
287
            {
288
 
                String thisName = Encoding.Unicode.GetString(this.EntryName).ToUpper(CultureInfo.InvariantCulture);
289
 
                String otherName = Encoding.Unicode.GetString(otherDir.EntryName).ToUpper(CultureInfo.InvariantCulture);
 
288
                String thisName = Encoding.Unicode.GetString(this.EntryName, 0, this.NameLength).ToUpper(CultureInfo.InvariantCulture);
 
289
                String otherName = Encoding.Unicode.GetString(otherDir.EntryName, 0, otherDir.NameLength).ToUpper(CultureInfo.InvariantCulture);
290
290
 
291
291
                for (int z = 0; z < thisName.Length; z++)
292
292
                {
390
390
            leftSibling = rw.ReadInt32();
391
391
            rightSibling = rw.ReadInt32();
392
392
            child = rw.ReadInt32();
 
393
 
 
394
            // Thank you to bugaccount (BugTrack id 3519554)
 
395
            if (stgType == StgType.StgInvalid)
 
396
            {
 
397
                leftSibling = NOSTREAM;
 
398
                rightSibling = NOSTREAM;
 
399
                child = NOSTREAM;
 
400
            }
 
401
 
393
402
            storageCLSID = new Guid(rw.ReadBytes(16));
394
403
            stateBits = rw.ReadInt32();
395
404
            creationDate = rw.ReadBytes(8);