nightstyles / alembic

Automatically exported from code.google.com/p/alembic
Other
1 stars 0 forks source link

String arrays incorrectly sharing a key. #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
These 2 string arrays end up sharing the same key.

std::vector < Alembic::Util::str_t > vals2(4);
vals2[0] = "";
vals2[1] = "Is the cake really a lie?";
vals2[2] = "";
vals2[3] = "I certainly hope not.";

std::vector < Alembic::Util::str_t > vals3(4);
vals3[0] = "Is the cake really a lie?";
vals3[1] = "";
vals3[2] = "";
vals3[3] = "I certainly hope not.";

It is probably because the NULL character isn't being accounted for during key 
calculation for strings.

Original issue reported on code.google.com by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Issue 62 has been merged into this issue.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Issue 63 has been merged into this issue.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
AbcCoreHDF5/Tests/ArrayPropertyTests.cpp  testExtentArrayStrings() tests this.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Fixed in the latest checkin to default.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
Yep, I see that it works.  I made the same change for wstrings as well, because 
it was a one-liner, in joesperiment branch.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03