mirror of
https://github.com/jwetzell/osc-js.git
synced 2026-08-22 07:19:00 +00:00
Merge pull request #26 from jwetzell/bundle-min-size
fix bundle minimum size check
This commit is contained in:
@@ -3,7 +3,7 @@ import { OSCBundle } from './models';
|
|||||||
import { oscTypeConverterMap } from './osc-types';
|
import { oscTypeConverterMap } from './osc-types';
|
||||||
|
|
||||||
export function bundleFromBuffer(bytes: Uint8Array): [OSCBundle | undefined, Uint8Array | undefined] {
|
export function bundleFromBuffer(bytes: Uint8Array): [OSCBundle | undefined, Uint8Array | undefined] {
|
||||||
if (bytes.length < 8) {
|
if (bytes.length < 20) {
|
||||||
throw new Error('bundle has to be at least 20 bytes');
|
throw new Error('bundle has to be at least 20 bytes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user