Skip to content

Commit

Permalink
fix: TotalPlayTime not converted directly to UInt32
Browse files Browse the repository at this point in the history
  • Loading branch information
cengelha committed Feb 9, 2025
1 parent 2e47bf6 commit ba07021
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ All notable changes to this project will be documented in this file. It uses the
[Keep a Changelog](http://keepachangelog.com/en/1.0.0/) principles and [Semantic Versioning](https://semver.org/)
since 1.0.0.

## Unreleased
## Unreleased (0.14.1)

### Known Issues
### Added
### Changed
### Deprecated
### Removed
### Fixed
* Potential exception when having a really high play time
### Security

## 0.14.0 (2025-02-09)
Expand Down
2 changes: 1 addition & 1 deletion libNOM.io/Extensions/Regex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal static partial class MatchExtensions
/// <returns></returns>
/// <exception cref="FormatException" />
/// <exception cref="OverflowException" />
internal static int ToInt32Value(this Match self) => System.Convert.ToInt32(self.Groups[1].Value);
internal static uint ToUInt32Value(this Match self) => System.Convert.ToUInt32(self.Groups[1].Value);

/// <Gets>
/// Gets the captured substring from the input string.
Expand Down
2 changes: 1 addition & 1 deletion libNOM.io/Meta/TotalPlayTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal static partial class TotalPlayTime
/// </summary>
/// <param name="json"></param>
/// <returns></returns>
public static uint Get(string? json) => (uint)(RegexesTotalPlayTime.Match(json)?.ToInt32Value() ?? 0);
public static uint Get(string? json) => RegexesTotalPlayTime.Match(json)?.ToUInt32Value() ?? 0;

#endregion
}
2 changes: 1 addition & 1 deletion libNOM.io/libNOM.io.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<!-- Package -->
<PropertyGroup Label="General">
<Version>0.14.0</Version>
<Version>0.14.1-beta.1</Version>
<Authors>cengelha</Authors>
<Description>Provides reading and writing save files from the game No Man's Sky for all possible platforms as well as related actions.</Description>
<Copyright>Copyright (c) Christian Engelhardt 2021</Copyright>
Expand Down

0 comments on commit ba07021

Please sign in to comment.