Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
0a0dd033
Commit
0a0dd033
authored
May 16, 2013
by
csharptest
Committed by
rogerk
May 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug in limited input stream's Position, Introduced Position on output stream
parent
8c8a82a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
CodedInputStream.cs
src/ProtocolBuffers/CodedInputStream.cs
+1
-1
CodedOutputStream.cs
src/ProtocolBuffers/CodedOutputStream.cs
+14
-1
No files found.
src/ProtocolBuffers/CodedInputStream.cs
View file @
0a0dd033
...
@@ -166,7 +166,7 @@ namespace Google.ProtocolBuffers
...
@@ -166,7 +166,7 @@ namespace Google.ProtocolBuffers
get
get
{
{
if
(
input
!=
null
)
if
(
input
!=
null
)
return
input
.
Position
-
(
bufferSize
-
bufferPos
);
return
input
.
Position
-
(
(
bufferSize
+
bufferSizeAfterLimit
)
-
bufferPos
);
return
bufferPos
;
return
bufferPos
;
}
}
}
}
...
...
src/ProtocolBuffers/CodedOutputStream.cs
View file @
0a0dd033
...
@@ -125,7 +125,20 @@ namespace Google.ProtocolBuffers
...
@@ -125,7 +125,20 @@ namespace Google.ProtocolBuffers
}
}
#
endregion
#
endregion
/// <summary>
/// Returns the current position in the stream, or the position in the output buffer
/// </summary>
public
long
Position
{
get
{
if
(
output
!=
null
)
return
output
.
Position
+
position
;
return
position
;
}
}
void
ICodedOutputStream
.
WriteMessageStart
()
{
}
void
ICodedOutputStream
.
WriteMessageStart
()
{
}
void
ICodedOutputStream
.
WriteMessageEnd
()
{
Flush
();
}
void
ICodedOutputStream
.
WriteMessageEnd
()
{
Flush
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment