Skip to content

Commit

Permalink
Fixed handling of empty spans
Browse files Browse the repository at this point in the history
  • Loading branch information
martindevans committed Jan 2, 2024
1 parent 3925545 commit bac3e43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LLama/Native/NativeApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static int llama_model_meta_key_by_index(SafeLlamaModelHandle model, int
{
unsafe
{
fixed (byte* destPtr = &dest[0])
fixed (byte* destPtr = dest)
{
return llama_model_meta_key_by_index_native(model, index, destPtr, dest.Length);
}
Expand All @@ -468,7 +468,7 @@ public static int llama_model_meta_val_str_by_index(SafeLlamaModelHandle model,
{
unsafe
{
fixed (byte* destPtr = &dest[0])
fixed (byte* destPtr = dest)
{
return llama_model_meta_val_str_by_index_native(model, index, destPtr, dest.Length);
}
Expand Down

0 comments on commit bac3e43

Please sign in to comment.