Skip to content

Commit

Permalink
Point cache: Binary format corrupted due to an extra byte offset (#108)
Browse files Browse the repository at this point in the history
* Point cache header, wait for new line character only (/n) and skip carriage return(/r)

An extra trailing new line character was causing an invalid offset in binary point cache files.

* Update Changelog

* Remove unnecessary files
  • Loading branch information
gabrieldelacruz authored and julienf-unity committed Nov 26, 2020
1 parent c0e5e7d commit 473467a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The version number for this package has increased due to a version update of a r
- Allow world position usage in shaderGraph plugged into an alpha/opacity output [Case 1259511](https://issuetracker.unity3d.com/product/unity/issues/guid/1259511/)
- GPU Evaluation of Construct Matrix
- Random Per-Component on Set Attribute in Spawn Context [Case 1279294](https://issuetracker.unity3d.com/product/unity/issues/guid/1279294/)
- Fix corrupted UI in nodes due to corrupted point cache files [Case 1232867](https://fogbugz.unity3d.com/f/cases/1232867/)

## [7.4.1] - 2020-06-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,11 @@ private static void GetHeader(Stream s, out long byteLength, out List<string> li
char c = sr.ReadChar();
byteLength++;

if (c == '\n' || c == '\r')
if (c == '\r')
{
// skip
}
else if (c == '\n')
{
if (sb.Length > 0)
newline = true;
Expand Down

0 comments on commit 473467a

Please sign in to comment.