Skip to content

Commit

Permalink
Merge pull request #348 from De-Panther/fix_malloc_free_missing_error
Browse files Browse the repository at this point in the history
Fixed errors of Module._malloc and Module._free are not functions
  • Loading branch information
De-Panther committed Feb 2, 2024
2 parents 044d4cd + c6e9917 commit e0bc007
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Packages/webxr/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Errors of Module._malloc and Module._free are not functions.

## [0.21.0] - 2024-01-17
### Added
- An option to auto-load WebXRManager on start in WebXRSettings.
Expand Down
4 changes: 2 additions & 2 deletions Packages/webxr/Runtime/Plugins/WebGL/webxr.jspre
Original file line number Diff line number Diff line change
Expand Up @@ -1240,8 +1240,8 @@ Module['WebXR'].OnXRCapabilities = function (isARSupported, isVRSupported) {

Module['WebXR'].OnInputProfiles = function (input_profiles) {
var strBufferSize = lengthBytesUTF8(input_profiles) + 1;
var strBuffer = Module._malloc(strBufferSize);
var strBuffer = _malloc(strBufferSize);
stringToUTF8(input_profiles, strBuffer, strBufferSize);
Module.dynCall_vi(Module.WebXR.onInputProfilesPtr, strBuffer);
Module._free(strBuffer);
_free(strBuffer);
}

0 comments on commit e0bc007

Please sign in to comment.