Skip to content

Commit 1587145

Browse files
committed
Fixes a color bug introduced in 1.8.4.1
- Fixed issue #291
1 parent 9b5dc19 commit 1587145

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Source/SharpVectorCss/Css/CssPrimitiveColorValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public CssPrimitiveColorValue(int color, bool readOnly)
1111
{
1212
SetFloatValue(0);
1313
}
14-
else if (color > 0 && color <= 1)
14+
else if (color > 0 && color < 1)
1515
{
1616
color = (int)(255 * color);
1717
SetFloatValue(color);
@@ -58,7 +58,7 @@ protected override void OnSetCssText(string cssText)
5858
{
5959
color = 0;
6060
}
61-
else if (color > 0 && color <= 1)
61+
else if (color > 0 && color < 1)
6262
{
6363
color = (int)(255 * color);
6464
}

Tests/SharpVectorsCore/Utils/PathUtilsTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public sealed class PathUtilsTests
3232
"net6.0"
3333
#elif NET70
3434
"net7.0"
35+
#elif NET80
36+
"net8.0"
3537
#endif
3638
;
3739

@@ -119,7 +121,7 @@ public void GetAssemblyFileName()
119121
}
120122

121123
private string CombineInternal(params string[] paths) =>
122-
(string)_combineInternal.Invoke(null, new object[] { "", paths });
124+
_combineInternal.Invoke(null, new object[] { "", paths }) as string;
123125

124126
private string GetAssemblyPathInternal(Assembly assembly) =>
125127
(string)_getAssemblyPathInternal.Invoke(null, new object[] { assembly, "" });

0 commit comments

Comments
 (0)